diff options
Diffstat (limited to 'ext/wasm/SQLTester/SQLTester.run.mjs')
-rw-r--r-- | ext/wasm/SQLTester/SQLTester.run.mjs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ext/wasm/SQLTester/SQLTester.run.mjs b/ext/wasm/SQLTester/SQLTester.run.mjs index 0a0f8903b..4efd068e3 100644 --- a/ext/wasm/SQLTester/SQLTester.run.mjs +++ b/ext/wasm/SQLTester/SQLTester.run.mjs @@ -1,8 +1,26 @@ import {default as ns} from './SQLTester.mjs'; -const log = (...args)=>{ +const log = function f(...args){ console.log('SQLTester.run:',...args); + return f; }; +console.log("Loaded",ns); +const out = function f(...args){ return f.outer.out(...args) }; +out.outer = new ns.Outer(); +out.outer.getOutputPrefix = ()=>'SQLTester.run: '; +const outln = (...args)=>{ return out.outer.outln(...args) }; -log("SQLTester is ostensibly ready."); +log("ns =",ns); +out("Hi there. ").outln("SQLTester is ostensibly ready."); + +let ts = new ns.TestScript('/foo.test', ns.Util.utf8Encode(` +# comment line +select 1; +--testcase 0.0 +#--result 1 +`)); + +const sqt = new ns.SQLTester(); +sqt.verbosity(3); +ts.run(sqt); |