aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/SQLTester
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wasm/SQLTester')
-rw-r--r--ext/wasm/SQLTester/SQLTester.mjs12
-rw-r--r--ext/wasm/SQLTester/SQLTester.run.mjs11
2 files changed, 13 insertions, 10 deletions
diff --git a/ext/wasm/SQLTester/SQLTester.mjs b/ext/wasm/SQLTester/SQLTester.mjs
index 033673af0..f16d5a3a1 100644
--- a/ext/wasm/SQLTester/SQLTester.mjs
+++ b/ext/wasm/SQLTester/SQLTester.mjs
@@ -352,7 +352,7 @@ class SQLTester {
this.closeAllDbs();
this.metrics.nTest = 0;
this.#nullView = "nil";
- this.emitColNames = false;
+ this.#emitColNames = false;
this.#db.iCurrentDb = 0;
//this.#db.initSql.push("SELECT 1;");
}
@@ -605,7 +605,7 @@ class SQLTester {
}
}
}
- sb.append("\"");
+ sb.push("\"");
return sb.join('');
}
@@ -694,11 +694,11 @@ class SQLTester {
break;
}
}/* column loop */
+ if( ResultRowMode.NEWLINE === rowMode ){
+ spacing = 0;
+ sb.push('\n');
+ }
}/* row loop */
- if( ResultRowMode.NEWLINE === rowMode ){
- spacing = 0;
- sb.push('\n');
- }
}else{ // no output but possibly other side effects
while( capi.SQLITE_ROW === (rc = capi.sqlite3_step(pStmt)) ) {}
}
diff --git a/ext/wasm/SQLTester/SQLTester.run.mjs b/ext/wasm/SQLTester/SQLTester.run.mjs
index 735fe4dcd..bba1437e5 100644
--- a/ext/wasm/SQLTester/SQLTester.run.mjs
+++ b/ext/wasm/SQLTester/SQLTester.run.mjs
@@ -69,11 +69,13 @@ intentional error;
SELECT json_array(1,2,3)
--json [1,2,3]
--testcase tableresult-1
- select 1, 'a';
- select 2, 'b';
+ select 1, 'a' UNION
+ select 2, 'b' UNION
+ select 3, 'c' ORDER by 1
--tableresult
# [a-z]
2 b
+ 3 c
--end
--testcase json-block-1
select json_array(1,2,3);
@@ -110,14 +112,15 @@ const runTests = function(){
ts.run(sqt);
affirm( 'zilch' === sqt.nullValue() );
sqt.addTestScript(ts);
- sqt.runTests();
+ }else if(0){
+ sqt.addTestScript(ts);
}else{
for(const t of allTests){
sqt.addTestScript( new ns.TestScript(t) );
}
allTests.length = 0;
- sqt.runTests();
}
+ sqt.runTests();
}finally{
//log( "Metrics:", sqt.metrics );
sqt.reset();