| OLD | NEW |
| 1 # 2009 Nov 11 | 1 # 2009 Nov 11 |
| 2 # | 2 # |
| 3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
| 5 # | 5 # |
| 6 # May you do good and not evil. | 6 # May you do good and not evil. |
| 7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
| 8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
| 9 # | 9 # |
| 10 #*********************************************************************** | 10 #*********************************************************************** |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 forcedelete foo.db | 45 forcedelete foo.db |
| 46 set rc [ catchcmd "-batch foo.db" "CREATE TABLE t1(a);" ] | 46 set rc [ catchcmd "-batch foo.db" "CREATE TABLE t1(a);" ] |
| 47 set fexist [file exist foo.db] | 47 set fexist [file exist foo.db] |
| 48 list $rc $fexist | 48 list $rc $fexist |
| 49 } {{0 {}} 1} | 49 } {{0 {}} 1} |
| 50 | 50 |
| 51 # Shell silently ignores extra parameters. | 51 # Shell silently ignores extra parameters. |
| 52 # Ticket [f5cb008a65]. | 52 # Ticket [f5cb008a65]. |
| 53 do_test shell2-1.2.1 { | 53 do_test shell2-1.2.1 { |
| 54 set rc [catch { eval exec $CLI \":memory:\" \"select 3\" \"select 4\" } msg] | 54 set rc [catch { eval exec $CLI \":memory:\" \"select 3\" \"select 4\" } msg] |
| 55 list $rc \ | 55 list $rc $msg |
| 56 [regexp {Error: too many options: "select 4"} $msg] | 56 } {0 {3 |
| 57 } {1 1} | 57 4}} |
| 58 | 58 |
| 59 # Test a problem reported on the mailing list. The shell was at one point | 59 # Test a problem reported on the mailing list. The shell was at one point |
| 60 # returning the generic SQLITE_ERROR message ("SQL error or missing database") | 60 # returning the generic SQLITE_ERROR message ("SQL error or missing database") |
| 61 # instead of the "too many levels..." message in the test below. | 61 # instead of the "too many levels..." message in the test below. |
| 62 # | 62 # |
| 63 do_test shell2-1.3 { | 63 do_test shell2-1.3 { |
| 64 catchcmd "-batch test.db" { | 64 catchcmd "-batch test.db" { |
| 65 PRAGMA recursive_triggers = ON; | 65 PRAGMA recursive_triggers = ON; |
| 66 CREATE TABLE t5(a PRIMARY KEY, b, c); | 66 CREATE TABLE t5(a PRIMARY KEY, b, c); |
| 67 INSERT INTO t5 VALUES(1, 2, 3); | 67 INSERT INTO t5 VALUES(1, 2, 3); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 a | 190 a |
| 191 1 | 191 1 |
| 192 2 | 192 2 |
| 193 SELECT * FROM foo2; | 193 SELECT * FROM foo2; |
| 194 b | 194 b |
| 195 1 | 195 1 |
| 196 2 | 196 2 |
| 197 }} | 197 }} |
| 198 | 198 |
| 199 finish_test | 199 finish_test |
| OLD | NEW |