From: drh Date: Tue, 24 Apr 2012 13:14:49 +0000 (+0000) Subject: New test cases for the ".dump" and ".mode insert" commands of the shell. X-Git-Tag: version-3.7.12~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5128e85cde8d9a347ed53b53b290c9b7a7fd7629;p=thirdparty%2Fsqlite.git New test cases for the ".dump" and ".mode insert" commands of the shell. FossilOrigin-Name: dfce8569765614462a3952d1761c10d579984665 --- diff --git a/manifest b/manifest index 1e7684a508..89e022de88 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Move\sthe\sshell\stest\sscripts\sinto\sthe\stest/\ssubfolder\sso\sthat\sthey\sare\nrun\sautomatically\sby\s"make\stest". -D 2012-04-24T12:46:05.097 +C New\stest\scases\sfor\sthe\s".dump"\sand\s".mode\sinsert"\scommands\sof\sthe\sshell. +D 2012-04-24T13:14:49.245 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -689,11 +689,11 @@ F test/shared6.test 866bb4982c45ce216c61ded5e8fde4e7e2f3ffa9 F test/shared7.test 960760bc8d03e1419e70dea69cf41db62853616e F test/shared_err.test 91e26ec4f3fbe07951967955585137e2f18993de F test/sharedlock.test ffa0a3c4ac192145b310f1254f8afca4d553eabf -F test/shell1.test 6d5a331713a7eadde26802b6be7f6330a1064319 w tool/shell1.test -F test/shell2.test 037d6ad16e873354195d30bb2dc4b5321788154a w tool/shell2.test -F test/shell3.test 9196c42772d575685e722c92b4b39053c6ebba59 w tool/shell3.test -F test/shell4.test aa4eef8118b412d1a01477a53426ece169ea86a9 w tool/shell4.test -F test/shell5.test fa2188bbb13fe2d183fd04a5f7b512650c35ef5d w tool/shell5.test +F test/shell1.test 7dcd612b0018ddad783647d984fffa76791ffd3d +F test/shell2.test 037d6ad16e873354195d30bb2dc4b5321788154a +F test/shell3.test 9196c42772d575685e722c92b4b39053c6ebba59 +F test/shell4.test aa4eef8118b412d1a01477a53426ece169ea86a9 +F test/shell5.test fa2188bbb13fe2d183fd04a5f7b512650c35ef5d F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3 F test/shrink.test 8c70f62b6e8eb4d54533de6d65bd06b1b9a17868 F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329 @@ -995,7 +995,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh a8a0a3babda96dfb1ff51adda3cbbf3dfb7266c2 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 282f2a74c23aa3fca6087bdeaf5d961b4f5bbe47 -R fb1a373c8aab089fc987aaa3b3a46480 +P 9fb7da6904e479f4671eeebf1a4b7e4e4e4f2b7b +R 6b8677ba1888a50ec99e6b37809051dc U drh -Z d17213a51e75d7b6538576f270927349 +Z 48923fe0d240285d5799cf9cb9177252 diff --git a/manifest.uuid b/manifest.uuid index 4c160508c7..83609d3c1d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9fb7da6904e479f4671eeebf1a4b7e4e4e4f2b7b \ No newline at end of file +dfce8569765614462a3952d1761c10d579984665 \ No newline at end of file diff --git a/test/shell1.test b/test/shell1.test index 473d5a3845..a05b3dcab2 100644 --- a/test/shell1.test +++ b/test/shell1.test @@ -691,4 +691,33 @@ do_test shell1-3-28.1 { ".log stdout\nSELECT coalesce(sqlite_log(123,'hello'),'456');" } "0 {(123) hello\n456}" +# Test the output of the ".dump" command +# +do_test shell1-4.1 { + db eval { + CREATE TABLE t1(x); + INSERT INTO t1 VALUES(null), (1), (2.25), ('hello'), (x'807f'); + } + catchcmd test.db {.dump} +} {0 {PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE t1(x); +INSERT INTO "t1" VALUES(NULL); +INSERT INTO "t1" VALUES(1); +INSERT INTO "t1" VALUES(2.25); +INSERT INTO "t1" VALUES('hello'); +INSERT INTO "t1" VALUES(X'807F'); +COMMIT;}} + +# Test the output of ".mode insert" +# +do_test shell1-4.2 { + catchcmd test.db ".mode insert t1\nselect * from t1;" +} {0 {INSERT INTO t1 VALUES(NULL); +INSERT INTO t1 VALUES(1); +INSERT INTO t1 VALUES(2.25); +INSERT INTO t1 VALUES('hello'); +INSERT INTO t1 VALUES(X'807f');}} + + finish_test