mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add sqlite3_wasm_vfs_create_file() to replace Emscripten's FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration).
FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
This commit is contained in:
@ -229,16 +229,14 @@
|
||||
T.assert(1===ev.resultRows.length)
|
||||
.assert(2===ev.resultRows[0][0]);
|
||||
});
|
||||
if(0){
|
||||
// export requires reimpl. for portability reasons.
|
||||
runOneTest('export',{}, function(ev){
|
||||
ev = ev.result;
|
||||
T.assert('string' === typeof ev.filename)
|
||||
.assert(ev.buffer instanceof Uint8Array)
|
||||
.assert(ev.buffer.length > 1024)
|
||||
.assert('application/x-sqlite3' === ev.mimetype);
|
||||
});
|
||||
}
|
||||
runOneTest('export',{}, function(ev){
|
||||
ev = ev.result;
|
||||
log("export result:",ev);
|
||||
T.assert('string' === typeof ev.filename)
|
||||
.assert(ev.byteArray instanceof Uint8Array)
|
||||
.assert(ev.byteArray.length > 1024)
|
||||
.assert('application/x-sqlite3' === ev.mimetype);
|
||||
});
|
||||
/***** close() tests must come last. *****/
|
||||
runOneTest('close',{unlink:true},function(ev){
|
||||
ev = ev.result;
|
||||
@ -342,4 +340,6 @@
|
||||
}
|
||||
};
|
||||
log("Init complete, but async init bits may still be running.");
|
||||
log("Installing Worker into global scope SW for dev purposes.");
|
||||
self.SW = SW;
|
||||
})();
|
||||
|
Reference in New Issue
Block a user