1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add a few more zipfile tests. No changes to code.

FossilOrigin-Name: 3f621545879ea39502cfaf2b61883f92c077070274b4fdf45524ded81cac3e63
This commit is contained in:
dan
2018-02-01 20:42:23 +00:00
parent 15daa6b53e
commit 668845bb0b
4 changed files with 86 additions and 9 deletions

View File

@ -84,6 +84,7 @@ do_faultsim_test 4 -faults oom* -body {
}
reset_db
sqlite3_db_config_lookaside db 0 0 0
load_static_extension db zipfile
do_execsql_test 5.0 {
@ -127,6 +128,38 @@ do_faultsim_test 5.3 -faults oom* -prep {
faultsim_test_result {0 {}}
}
do_faultsim_test 6.1 -faults oom* -body {
execsql {
WITH c(n, d) AS (
VALUES('a.txt', '1234567890') UNION ALL
VALUES('dir', NULL)
)
SELECT zipfile(n, d) IS NULL FROM c;
}
} -test {
faultsim_test_result {0 0}
}
set big [string repeat 0123456789 1000]
do_faultsim_test 6.2 -faults oom* -body {
execsql {
WITH c(n, d) AS (
VALUES('a.txt', $big)
)
SELECT zipfile(n, NULL, NULL, d, 0) IS NULL FROM c;
}
} -test {
faultsim_test_result {0 0}
}
do_faultsim_test 7.0 -faults oom* -prep {
catch { db close }
sqlite3 db ""
} -body {
load_static_extension db zipfile
} -test {
}
finish_test