]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor doc cleanups in SQLTester.mjs and confirm that the tests pass with both OPFS...
authorstephan <stephan@noemail.net>
Fri, 18 Oct 2024 23:54:23 +0000 (23:54 +0000)
committerstephan <stephan@noemail.net>
Fri, 18 Oct 2024 23:54:23 +0000 (23:54 +0000)
FossilOrigin-Name: ac747d57c2a26b47644bca2a9b191b09f5180f6872dce9c3261c370a18c848a2

ext/wasm/SQLTester/SQLTester.mjs
ext/wasm/SQLTester/SQLTester.run.mjs
ext/wasm/SQLTester/index.html
manifest
manifest.uuid

index f16d5a3a143c3713e76b0fdc9ab68b1c0de67dc4..e76019694ea35fc9ed20f68692f8c85b7f33a2d4 100644 (file)
@@ -13,8 +13,8 @@
 ** implementation of the SQLTester framework.
 **
 ** This version is not well-documented because it's a direct port of
-** the Java immplementation, which is documented: in the main SQLite3
-** source tree, see ext/jni/src/org/sqlite/jni/tester/SQLite3Tester.java.
+** the Java implementation, which is documented: in the main SQLite3
+** source tree, see ext/jni/src/org/sqlite/jni/capi/SQLTester.java.
 */
 
 import sqlite3ApiInit from '/jswasm/sqlite3.mjs';
@@ -28,7 +28,7 @@ const log = (...args)=>{
 /**
    Try to install vfsName as the new default VFS. Once this succeeds
    (returns true) then it becomes a no-op on future calls. Throws if
-   vfs registration as the default VFS fails but has no side effects
+   VFS registration as the default VFS fails but has no side effects
    if vfsName is not currently registered.
 */
 const tryInstallVfs = function f(vfsName){
@@ -48,11 +48,10 @@ tryInstallVfs.vfsName = undefined;
 
 if( 0 && globalThis.WorkerGlobalScope ){
   // Try OPFS storage, if available...
-  if( 0 && sqlite3.oo1.OpfsDb ){
+  if( 1 && sqlite3.oo1.OpfsDb ){
     /* Really slow with these tests */
     tryInstallVfs("opfs");
-  }
-  if( sqlite3.installOpfsSAHPoolVfs ){
+  }else if( sqlite3.installOpfsSAHPoolVfs ){
     await sqlite3.installOpfsSAHPoolVfs({
       clearOnInit: true,
       initialCapacity: 15,
@@ -207,6 +206,9 @@ const Util = newObj({
                               ['string','string'])
 })/*Util*/;
 
+/**
+   Output logger utility.
+*/
 class Outer {
   #lnBuf = [];
   #verbosity = 0;
index bba1437e5278434ecb77dcb5d4faa8035565b896..bf20c2ceed4408f9aa32032e127194d1d3802159 100644 (file)
@@ -9,7 +9,8 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** This file contains a test application for SQLTester.js.
+** This file contains a test application for SQLTester.mjs. It loads
+** test scripts and runs them through the SQLTester class.
 */
 import {default as ns} from './SQLTester.mjs';
 import {default as allTests} from './test-list.mjs';
@@ -33,7 +34,7 @@ const affirm = function(expr, msg){
   }
 }
 
-let ts = new ns.TestScript('/foo.test',`
+let ts = new ns.TestScript('SQLTester-sanity-check.test',`
 /*
 ** This is a comment. There are many like it but this one is mine.
 **
@@ -93,6 +94,7 @@ SELECT json_array(1,2,3)
   select 1 as 'a', 2 as 'b';
 --result 1 2
 --close
+--testcase the-end
 --print Until next time
 `);
 
@@ -112,8 +114,6 @@ const runTests = function(){
       ts.run(sqt);
       affirm( 'zilch' === sqt.nullValue() );
       sqt.addTestScript(ts);
-    }else if(0){
-      sqt.addTestScript(ts);
     }else{
       for(const t of allTests){
         sqt.addTestScript( new ns.TestScript(t) );
index 1dffad63e288bc74037d6a333d7af620a7831949..2d85b91163c3f22021fd77b4a6840d803f989dbf 100644 (file)
               break;
           }
         };
-        //runTests()
-        /* Inexplicably, */
       })();
     </script>
   </body>
index b4830f2b6f08b3ca031919d5374e5847608981a8..4228c85e56a16d41eae71bd38d795ad3750dfca3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthree\sbugs\sin\sSQLTester.mjs\swhich\scaused\s--tableresult\stests,\sescaping\sof\sSQL\svalues\sto\sincorrectly\sfail,\sand\sthe\s--column-names\ssetting\sto\snot\sbe\sreset\sbetween\stests.
-D 2024-10-18T23:36:08.764
+C Minor\sdoc\scleanups\sin\sSQLTester.mjs\sand\sconfirm\sthat\sthe\stests\spass\swith\sboth\sOPFS\sVFSes.
+D 2024-10-18T23:54:23.694
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -612,9 +612,9 @@ F ext/wasm/GNUmakefile 128f8e9830dd8c50c14558649a6f13a2742e9d48223cc67485779baee
 F ext/wasm/README-dist.txt 6382cb9548076fca472fb3330bbdba3a55c1ea0b180ff9253f084f07ff383576
 F ext/wasm/README.md a8a2962c3aebdf8d2104a9102e336c5554e78fc6072746e5daf9c61514e7d193
 F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff
-F ext/wasm/SQLTester/SQLTester.mjs 41d405eaecf8a0d837e526656167563fa0f33ea985bb49593e1a1d3bd2a8ba9d
-F ext/wasm/SQLTester/SQLTester.run.mjs beace5a76a7a56f8b336e109f7da15d8d06d633eebebfb85bb26d3b4a1d3dad5
-F ext/wasm/SQLTester/index.html 3f8a016df0776be76605abf20e815ecaafbe055abac0e1fe5ea080e7846b760d
+F ext/wasm/SQLTester/SQLTester.mjs 66e1adc3d79467b68e3e40614fd42c1a577c7e219ec0985db966eded52a941e5
+F ext/wasm/SQLTester/SQLTester.run.mjs 57f2adb33f43f2784abbf8026c1bfd049d8013af1998e7dcb8b50c89ffc332e0
+F ext/wasm/SQLTester/index.html 64f3435084c7d6139b08d1f2a713828a73f68de2ae6a3112cbb5980d991ba06f
 F ext/wasm/SQLTester/touint8array.c 2d5ece04ec1393a6a60c4bf96385bda5e1a10ad49f3038b96460fc5e5aa7e536
 F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-core 2bcbbfe3b95c043ed6037e2708a2ee078d212dd1612c364f93588d8dc97300fe
 F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-extras fe40d6d758646e38f8b15f709044951e10884214f5453d35502100179c388c13
@@ -2219,8 +2219,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 31179fa78e47cafae49df35f28e5c4b01654665d54ee60d059545ce2d97a39a2
-R 1b048eaff8c11ad5f6abc5fcdc2c6077
+P 779368dd9b8bb20890b06229c4c3c3b5d153ee88d1af472799515cdc599c870a
+R 38c8cbe7585681d77c9e8f8ff1f867fd
 U stephan
-Z ed8c20191a02ef81280c701c6505fc65
+Z b702bafea7281c06a3d6db71e8342e04
 # Remove this line to create a well-formed Fossil manifest.
index 06bf00eb2d3a1e19f0c7e92541dd1c577c11fcf4..8fafc99bf7f4044ee3033ba117c6d17d1809dada 100644 (file)
@@ -1 +1 @@
-779368dd9b8bb20890b06229c4c3c3b5d153ee88d1af472799515cdc599c870a
+ac747d57c2a26b47644bca2a9b191b09f5180f6872dce9c3261c370a18c848a2