From 23caead6cbee369c7c7bccf9cb4e90c3487634ae Mon Sep 17 00:00:00 2001 From: stephan Date: Fri, 18 Oct 2024 23:36:08 +0000 Subject: Fix three bugs in SQLTester.mjs which caused --tableresult tests, escaping of SQL values to incorrectly fail, and the --column-names setting to not be reset between tests. FossilOrigin-Name: 779368dd9b8bb20890b06229c4c3c3b5d153ee88d1af472799515cdc599c870a --- ext/wasm/SQLTester/SQLTester.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/wasm/SQLTester/SQLTester.mjs') 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)) ) {} } -- cgit v1.2.3