/
clang
/
sqlite
Обзор
Документация
Войти
/
clang
/
sqlite
Код
Вики
Пакеты
0
Релизы
0
Аналитика
version-3.53.2
test/vt100-a.sql
48 строк
2 KB
drh
Fix the test/vt100-a.sql script to use .testcase and .check.
15 дек 2025, 16:26
15 дек 2025, 16:26
586a649
Код
Авторство
О чём код?
/* ** Run this script using the "sqlite3" command-line shell ** test test formatting of output text that contains ** vt100 escape sequences. */ .mode box -escape off CREATE TEMP TABLE t1(a,b,c); INSERT INTO t1 VALUES ('one','twotwotwo','thirty-three'), (unistr('\u001b[91mRED\u001b[0m'),'fourfour','fifty-five'), ('six','seven','eighty-eight'); .testcase 100 SELECT * FROM t1; .check <<END ╭─────┬───────────┬──────────────╮ │ a │ b │ c │ ╞═════╪═══════════╪══════════════╡ │ one │ twotwotwo │ thirty-three │ │ [91mRED[0m │ fourfour │ fifty-five │ │ six │ seven │ eighty-eight │ ╰─────┴───────────┴──────────────╯ END .mode box -escape ascii .testcase 200 SELECT * FROM t1; .check <<END ╭────────────────┬───────────┬──────────────╮ │ a │ b │ c │ ╞════════════════╪═══════════╪══════════════╡ │ one │ twotwotwo │ thirty-three │ │ ^[[91mRED^[[0m │ fourfour │ fifty-five │ │ six │ seven │ eighty-eight │ ╰────────────────┴───────────┴──────────────╯ END .testcase 300 .mode box -escape symbol SELECT * FROM t1; .check <<END ╭──────────────┬───────────┬──────────────╮ │ a │ b │ c │ ╞══════════════╪═══════════╪══════════════╡ │ one │ twotwotwo │ thirty-three │ │ ␛[91mRED␛[0m │ fourfour │ fifty-five │ │ six │ seven │ eighty-eight │ ╰──────────────┴───────────┴──────────────╯ END