From bf4f51ce7866dc5c5ce3acf483636f7a281e3d18 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 7 Dec 2019 18:23:41 +0000 Subject: Fix 2 test-cases, which were failing when TCL_UTF_MAX=6. Add UTF_MAX=6 UNIX build to Travis as proof that now all test-cases pass for UTF_MAX=6 (still not officially supported) --- .travis.yml | 7 +++++++ tests/encoding.test | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9fa6f1f..537621c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,13 @@ matrix: env: - BUILD_DIR=unix - CFGOPT=CFLAGS=-DTCL_UTF_MAX=4 + - name: "Linux/GCC/Shared: UTF_MAX=6" + os: linux + dist: xenial + compiler: gcc + env: + - BUILD_DIR=unix + - CFGOPT=CFLAGS=-DTCL_UTF_MAX=6 - name: "Linux/GCC/Static" os: linux dist: xenial diff --git a/tests/encoding.test b/tests/encoding.test index 15aba11..b11c731 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -331,13 +331,13 @@ test encoding-15.3 {UtfToUtfProc null character input} { test encoding-15.4 {UtfToUtfProc emoji character input} { set x \xED\xA0\xBD\xED\xB8\x82 set y [encoding convertfrom utf-8 \xED\xA0\xBD\xED\xB8\x82] - list [string length $x] [string length $y] $y -} "6 2 \uD83D\uDE02" + list [string length $x] $y +} "6 \uD83D\uDE02" test encoding-15.5 {UtfToUtfProc emoji character input} { set x \xF0\x9F\x98\x82 set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82] - list [string length $x] [string length $y] $y -} "4 2 \uD83D\uDE02" + list [string length $x] $y +} "4 \uD83D\uDE02" test encoding-15.6 {UtfToUtfProc emoji character output} { set x \uDE02\uD83D\uDE02\uD83D set y [encoding convertto utf-8 \uDE02\uD83D\uDE02\uD83D] -- cgit v0.12