Add further pager tests.
FossilOrigin-Name: 4104b175a8c3560a7680f3d2b54416821bb2e19d
diff --git a/test/pagerfault.test b/test/pagerfault.test
index 81a62ed..0af8d51 100644
--- a/test/pagerfault.test
+++ b/test/pagerfault.test
@@ -241,6 +241,30 @@
faultsim_test_result {0 {}}
}
+#-------------------------------------------------------------------------
+# Test fault-injection as part of a commit when using
+# journal_mode=TRUNCATE.
+#
+do_test pagerfault-6-pre1 {
+ faultsim_delete_and_reopen
+ db func a_string a_string
+ execsql {
+ CREATE TABLE t1(a UNIQUE, b UNIQUE);
+ INSERT INTO t1 VALUES(a_string(200), a_string(300));
+ }
+ faultsim_save_and_close
+} {}
+do_faultsim_test pagerfault-6.1 -prep {
+ faultsim_restore_and_reopen
+ db func a_string a_string
+ execsql { PRAGMA journal_mode = TRUNCATE }
+} -body {
+ execsql { INSERT INTO t1 SELECT a_string(200), a_string(300) FROM t1 }
+} -test {
+ faultsim_test_result {0 {}}
+ faultsim_integrity_check
+}
+
# The following was an attempt to get a bitvec malloc to fail. Didn't work.
#
# do_test pagerfault-6-pre1 {