1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Get the basic parsing pieces and command dispatching in place in the JS SQLTester.

FossilOrigin-Name: 8fcc2a553c1e26734902bbdee0c38183ee22b7b5c75f07405529bb79db34145a
This commit is contained in:
stephan
2023-08-29 13:28:36 +00:00
parent 524ddc940d
commit 0fc20a32c0
4 changed files with 299 additions and 62 deletions

View File

@@ -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);