sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
sqlite / test / output-redirect-test.txt
| 1 | # This script is used to test certain output redirection commands |
| 2 | # in the CLI, specifically: |
| 3 | # |
| 4 | # .www |
| 5 | # .once -w |
| 6 | # .output -w |
| 7 | # .once -e |
| 8 | # .ooutput -e |
| 9 | # .excel |
| 10 | # .once -x |
| 11 | # .output -x |
| 12 | # |
| 13 | # Because of system interactions it is difficult to test these |
| 14 | # commands automatically. They must be tested manually, with the |
| 15 | # aid of this script. |
| 16 | # |
| 17 | # To run the test: |
| 18 | # |
| 19 | # 1. Be on a console of the machine under test (not on ssh). |
| 20 | # 2. Run "./sqlite3 test/output-redir-test.txt" or similar. |
| 21 | # 3. Verify that all the right pop-ups appear. More information |
| 22 | # on what popups to expect appears on the console output. |
| 23 | # |
| 24 | .print "Expect to see 8 output pop-ups: |
| 25 | .print " * 3 new tabs in your web-browser" |
| 26 | .print " * 2 editor windows" |
| 27 | .print " * 3 spreadsheets" |
| 28 | .print "There is a 2-second pause between tests. Wait until" |
| 29 | .print "prompted to verify results...." |
| 30 | .print "" |
| 31 | .print "Running web-browser tests first..." |
| 32 | .mode box |
| 33 | CREATE TABLE t1(x); |
| 34 | INSERT INTO t1 VALUES |
| 35 | ('Web-browser test 1 of 3'), |
| 36 | ('Test for the ".www" commmand.'); |
| 37 | .www |
| 38 | SELECT * FROM t1; |
| 39 | |
| 40 | DELETE FROM t1; |
| 41 | INSERT INTO t1 VALUES |
| 42 | ('Web-browser test 2 of 3'), |
| 43 | ('Test for the ".once -w" commmand.'); |
| 44 | .once -w |
| 45 | SELECT * FROM t1; |
| 46 | |
| 47 | DELETE FROM t1; |
| 48 | INSERT INTO t1 VALUES |
| 49 | ('Web-browser test 3 of 3'), |
| 50 | ('Test for the ".output -w" commmand.'), |
| 51 | ('Confirm additional text below.'); |
| 52 | .output -w |
| 53 | SELECT * FROM t1; |
| 54 | .print "This test should also appear after the table." |
| 55 | .print "in the web-browser output". |
| 56 | .output |
| 57 | |
| 58 | .print "Web-browser tests are done. Starting editor tests." |
| 59 | |
| 60 | DELETE FROM t1; |
| 61 | INSERT INTO t1 VALUES |
| 62 | ('Editor test 1 of 2'), |
| 63 | ('Test for the ".once -e" commmand.'); |
| 64 | .once -e |
| 65 | SELECT * FROM t1; |
| 66 | |
| 67 | DELETE FROM t1; |
| 68 | INSERT INTO t1 VALUES |
| 69 | ('Editor test 2 of 2'), |
| 70 | ('Test for the ".output -e" commmand.'), |
| 71 | ('Confirm additional text below.'); |
| 72 | .output -e |
| 73 | SELECT * FROM t1; |
| 74 | .print "This test should also appear after the table." |
| 75 | .print "in the pop-up editor window.". |
| 76 | .output |
| 77 | .print "Pop-up editor tests are done. Starting spreadsheed tests" |
| 78 | |
| 79 | DELETE FROM t1; |
| 80 | INSERT INTO t1 VALUES |
| 81 | ('Spreadsheet test 1 of 3'), |
| 82 | ('Test for the ".excel" commmand.'); |
| 83 | .excel |
| 84 | SELECT * FROM t1; |
| 85 | |
| 86 | DELETE FROM t1; |
| 87 | INSERT INTO t1 VALUES |
| 88 | ('Spreadsheet test 2 of 3'), |
| 89 | ('Test for the ".once -x" commmand.'); |
| 90 | .once -x |
| 91 | SELECT * FROM t1; |
| 92 | |
| 93 | DELETE FROM t1; |
| 94 | INSERT INTO t1 VALUES |
| 95 | ('Spreadsheet test 3 of 3'), |
| 96 | ('Test for the ".output -x" commmand.'), |
| 97 | ('Confirm additional text below.'); |
| 98 | .output -x |
| 99 | SELECT * FROM t1; |
| 100 | .print "This test should also appear after the table." |
| 101 | .print "in the spreadsheet output". |
| 102 | .output |
| 103 | |
| 104 | .print "All tests are done. You may now verify the results." |