mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-28 17:56:17 +08:00
with .sql or .txt, then process that file as an SQL script. Use this feature for better testing. FossilOrigin-Name: 19cc0522e2255f21f6fb6af1442c2ba122fdd4deacd9ea2c181ce9e597b88770
51 lines
2.0 KiB
SQL
51 lines
2.0 KiB
SQL
#!sqlite3
|
|
/*
|
|
** Run this script using "sqlite3" to confirm that the command-line
|
|
** shell properly handles the output of double-width characters.
|
|
**
|
|
** https://sqlite.org/forum/forumpost/008ac80276
|
|
*/
|
|
.testcase 100
|
|
.mode box
|
|
CREATE TABLE data(word TEXT, description TEXT);
|
|
INSERT INTO data VALUES('〈οὐκέτι〉','Greek without dblwidth <...>');
|
|
SELECT * FROM data;
|
|
.check <<END
|
|
╭────────────┬──────────────────────────────╮
|
|
│ word │ description │
|
|
╞════════════╪══════════════════════════════╡
|
|
│ 〈οὐκέτι〉 │ Greek without dblwidth <...> │
|
|
╰────────────┴──────────────────────────────╯
|
|
END
|
|
|
|
.testcase 200
|
|
.mode table
|
|
SELECT * FROM data;
|
|
.check <<END
|
|
+------------+------------------------------+
|
|
| word | description |
|
|
+------------+------------------------------+
|
|
| 〈οὐκέτι〉 | Greek without dblwidth <...> |
|
|
+------------+------------------------------+
|
|
END
|
|
|
|
.testcase 300
|
|
.mode qbox
|
|
SELECT * FROM data;
|
|
.check <<END
|
|
╭──────────────┬────────────────────────────────╮
|
|
│ word │ description │
|
|
╞══════════════╪════════════════════════════════╡
|
|
│ '〈οὐκέτι〉' │ 'Greek without dblwidth <...>' │
|
|
╰──────────────┴────────────────────────────────╯
|
|
END
|
|
|
|
.testcase 400
|
|
.mode column
|
|
SELECT * FROM data;
|
|
.check <<END
|
|
word description
|
|
---------- ----------------------------
|
|
〈οὐκέτι〉 Greek without dblwidth <...>
|
|
END
|