mirror of
https://github.com/ascii-boxes/boxes.git
synced 2024-12-04 22:11:07 +01:00
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:
parent
7532faf755
commit
fc7f881767
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
:ARGS
|
||||
-al
|
||||
-n UTF-8 -al
|
||||
:INPUT
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m[38;5;33mb[0m
|
||||
|
@ -1,5 +1,5 @@
|
||||
:ARGS
|
||||
-ac
|
||||
-n UTF-8 -ac
|
||||
:INPUT
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m[38;5;33mb[0m
|
||||
|
@ -1,5 +1,5 @@
|
||||
:ARGS
|
||||
-ar
|
||||
-n UTF-8 -ar
|
||||
:INPUT
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m[38;5;33mb[0m
|
||||
|
@ -1,5 +1,5 @@
|
||||
:ARGS
|
||||
-ahrvbjr -ph3 -sx26
|
||||
-n UTF-8 -ahrvbjr -ph3 -sx26
|
||||
:INPUT
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m
|
||||
[38;5;63m [0m[38;5;63m [0m[38;5;63m [0m[38;5;33m [0m[38;5;33m [0m[38;5;33ma[0m[38;5;33mb[0m
|
||||
|
@ -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
|
||||
/\ /\ /\ /\
|
||||
/\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\
|
||||
|
@ -1,7 +1,7 @@
|
||||
:DESC
|
||||
Center align colored unicode text.
|
||||
:ARGS
|
||||
-d unicornsay -ac
|
||||
-n UTF-8 -d unicornsay -ac
|
||||
:INPUT
|
||||
[38;5;39m [0m[38;5;44m [0m[38;5;44m [0m[38;5;44m [0m[38;5;49m [0m[38;5;49m [0m[38;5;48m [0m[38;5;84m [0m[38;5;83m [0m[38;5;83m試[0m
|
||||
[38;5;44m [0m[38;5;49m [0m[38;5;49m [0m[38;5;48m [0m[38;5;84m [0m[38;5;83m常[0m[38;5;83m盤[0m
|
||||
|
@ -1,7 +1,7 @@
|
||||
:DESC
|
||||
Right align colored unicode text.
|
||||
:ARGS
|
||||
-d unicornsay -ar
|
||||
-n UTF-8 -d unicornsay -ar
|
||||
:INPUT
|
||||
[38;5;39m [0m[38;5;44m [0m[38;5;44m [0m[38;5;44m [0m[38;5;49m [0m[38;5;49m [0m[38;5;48m [0m[38;5;84m [0m[38;5;83m [0m[38;5;83m試[0m
|
||||
[38;5;44m [0m[38;5;49m [0m[38;5;49m [0m[38;5;48m [0m[38;5;84m [0m[38;5;83m常[0m[38;5;83m盤[0m
|
||||
|
Loading…
Reference in New Issue
Block a user