Skip to content
Snippets Groups Projects
Commit abaafa8e authored by Fredrik Noring's avatar Fredrik Noring
Browse files

Fixes.

Rev: lib/modules/Yabu.pmod/test.pike:1.2
parent ff581dde
No related branches found
No related tags found
No related merge requests found
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
#define ERR(msg) throw(({ msg+"\n", backtrace() })); #define ERR(msg) throw(({ msg+"\n", backtrace() }));
void main(int argc, array argv) int main(int argc, array argv)
{ {
.module.db("test.db", "wct")->purge(); .module.db("test.db", "wct")->purge();
object db = .module.db("test.db", "wct"); object db = .module.db("test.db", "wct");
object table = db["Aces"]; object table = db["Aces"];
// Test transactions // Test transactions.
table["Blixt"] = "Gordon"; table["Blixt"] = "Gordon";
object transaction = table->transaction(); object transaction = table->transaction();
...@@ -37,6 +37,7 @@ void main(int argc, array argv) ...@@ -37,6 +37,7 @@ void main(int argc, array argv)
if(table["Buck"] != "Rogers") if(table["Buck"] != "Rogers")
ERR("Table diff #9!"); ERR("Table diff #9!");
// Test multiple commands.
mapping m = ([]); mapping m = ([]);
for(int i = 0; i < 10; i++) { for(int i = 0; i < 10; i++) {
string s = (string)(i%3); string s = (string)(i%3);
...@@ -60,7 +61,9 @@ void main(int argc, array argv) ...@@ -60,7 +61,9 @@ void main(int argc, array argv)
} }
} }
// Remove test database.
db->purge(); db->purge();
write("Yabu test program says A OK.\n"); write("Yabu test program says everything is A OK.\n");
return 1;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment