summaryrefslogtreecommitdiff
path: root/test/dblwidth-a.sql
blob: 844b3ef03bbfc1ed705b3221c8830314ebb7694f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!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
*/
.open :memory:
.mode -reset quote
.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