interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / test / dblwidth-a.sql

52 lines · 2063 bytes Raw Blame History
1#!sqlite3
2/*
3** Run this script using "sqlite3" to confirm that the command-line
4** shell properly handles the output of double-width characters.
5**
6** https://sqlite.org/forum/forumpost/008ac80276
7*/
8.open :memory:
9.mode -reset quote
10.testcase 100
11.mode box
12CREATE TABLE data(word TEXT, description TEXT);
13INSERT INTO data VALUES('〈οὐκέτι〉','Greek without dblwidth <...>');
14SELECT * FROM data;
15.check <<END
16╭────────────┬──────────────────────────────╮
17│ word │ description │
18╞════════════╪══════════════════════════════╡
19│ 〈οὐκέτι〉 │ Greek without dblwidth <...> │
20╰────────────┴──────────────────────────────╯
21END
22
23.testcase 200
24.mode table
25SELECT * FROM data;
26.check <<END
27+------------+------------------------------+
28| word | description |
29+------------+------------------------------+
30| 〈οὐκέτι〉 | Greek without dblwidth <...> |
31+------------+------------------------------+
32END
33
34.testcase 300
35.mode qbox
36SELECT * FROM data;
37.check <<END
38╭──────────────┬────────────────────────────────╮
39│ word │ description │
40╞══════════════╪════════════════════════════════╡
41│ '〈οὐκέτι〉' │ 'Greek without dblwidth <...>' │
42╰──────────────┴────────────────────────────────╯
43END
44
45.testcase 400
46.mode column
47SELECT * FROM data;
48.check <<END
49 word description
50---------- ----------------------------
51〈οὐκέτι〉 Greek without dblwidth <...>
52END