diff options
author | stephan <stephan@noemail.net> | 2023-08-29 20:44:40 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-08-29 20:44:40 +0000 |
commit | 267c44771fec6758c371eb41d0ab99a9ea0c8452 (patch) | |
tree | fc76b05bfd2869f17dc99a2a3647a482dc655ddb /ext/wasm/SQLTester/SQLTester.run.mjs | |
parent | aa150477961c57bc0c873faf95f0bc600fc73af6 (diff) | |
download | sqlite-267c44771fec6758c371eb41d0ab99a9ea0c8452.tar.gz sqlite-267c44771fec6758c371eb41d0ab99a9ea0c8452.zip |
More fleshing out of JS SQLTester.
FossilOrigin-Name: 8c503dfb9fa15389613a819fcc1792e23d3c05f99a9f450f82eac5125298726f
Diffstat (limited to 'ext/wasm/SQLTester/SQLTester.run.mjs')
-rw-r--r-- | ext/wasm/SQLTester/SQLTester.run.mjs | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ext/wasm/SQLTester/SQLTester.run.mjs b/ext/wasm/SQLTester/SQLTester.run.mjs index 36d1ab5dc..5136d58a2 100644 --- a/ext/wasm/SQLTester/SQLTester.run.mjs +++ b/ext/wasm/SQLTester/SQLTester.run.mjs @@ -22,10 +22,10 @@ const affirm = function(expr, msg){ console.log("Loaded",ns); log("ns =",ns); -out("Hi there. ").outln("SQLTester is ostensibly ready."); +outln("SQLTester is ready."); -let ts = new ns.TestScript('/foo.test', ns.Util.utf8Encode( -` +let ts = new ns.TestScript('/foo.test',` +--print Hello, world. --close all --oom --db 0 @@ -65,17 +65,22 @@ SELECT json_array(1,2,3) select 1 as 'a', 2 as 'b'; --result 1 2 --close -`)); +--print Until next time +`); const sqt = new ns.SQLTester(); try{ - log( 'sqt.getCurrentDb()', sqt.getCurrentDb() ); + affirm( !sqt.getCurrentDb(), 'sqt.getCurrentDb()' ); sqt.openDb('/foo.db', true); - log( 'sqt.getCurrentDb()', sqt.getCurrentDb() ); + affirm( !!sqt.getCurrentDb(),'sqt.getCurrentDb()' ); sqt.verbosity(0); - affirm( 'zilch' !== sqt.nullValue() ); - ts.run(sqt); - affirm( 'zilch' === sqt.nullValue() ); + if(false){ + affirm( 'zilch' !== sqt.nullValue() ); + ts.run(sqt); + affirm( 'zilch' === sqt.nullValue() ); + } + sqt.addTestScript(ts); + sqt.runTests(); }finally{ sqt.reset(); } |