Explicitly set UTF-8 charset in unicode test cases

so that they don't fail on systems where UTF-8 is not properly set on the terminal #1
This commit is contained in:
Thomas Jensen 2021-02-12 22:14:37 +01:00
parent 7532faf755
commit fc7f881767
No known key found for this signature in database
GPG Key ID: A4ACEE270D0FB7DB
9 changed files with 12 additions and 8 deletions

View File

@ -265,6 +265,7 @@ const char *check_encoding(const char *manual_encoding, const char *system_encod
}
fprintf(stderr, "%s: Invalid character encoding: %s - falling back to %s\n",
PROJECT, manual_encoding, system_encoding);
fflush(stderr);
}
return system_encoding;
}

View File

@ -1,5 +1,8 @@
:DESC
Test center alignment of unicode text without escape sequences mixed in, but with some chars in double-width
(chinese). We always set the charset manually because else the build would fail on systems which have it set wrong.
:ARGS
-ac
-n UTF-8 -ac
:INPUT
a
ab

View File

@ -1,5 +1,5 @@
:ARGS
-al
-n UTF-8 -al
:INPUT
         a
     ab

View File

@ -1,5 +1,5 @@
:ARGS
-ac
-n UTF-8 -ac
:INPUT
         a
     ab

View File

@ -1,5 +1,5 @@
:ARGS
-ar
-n UTF-8 -ar
:INPUT
         a
     ab

View File

@ -1,5 +1,5 @@
:ARGS
-ahrvbjr -ph3 -sx26
-n UTF-8 -ahrvbjr -ph3 -sx26
:INPUT
         a
     ab

View File

@ -1,7 +1,7 @@
:DESC
This test case checks that a broken box with unicode and ansi sequences can be properly mended.
:ARGS
-d diamonds -ac -m
-n UTF-8 -d diamonds -ac -m
:INPUT
/\ /\ /\ /\
/\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\

View File

@ -1,7 +1,7 @@
:DESC
Center align colored unicode text.
:ARGS
-d unicornsay -ac
-n UTF-8 -d unicornsay -ac
:INPUT
         試
     常盤

View File

@ -1,7 +1,7 @@
:DESC
Right align colored unicode text.
:ARGS
-d unicornsay -ar
-n UTF-8 -d unicornsay -ar
:INPUT
         試
     常盤