diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-11-10 17:18:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-11-10 17:20:36 +0100 |
commit | 71ea84369e458eb6b4f4664dd7daa47bc96c7d32 (patch) | |
tree | bcbba2fd725fb6338fc1b449fb195c52709f7db4 /test/units | |
parent | dissect: make image name bold (diff) | |
download | systemd-71ea84369e458eb6b4f4664dd7daa47bc96c7d32.tar.xz systemd-71ea84369e458eb6b4f4664dd7daa47bc96c7d32.zip |
locale: honour new env var $SYSTEMD_UTF8=
This is useful to force off fancy unicode glyph use (i.e. use "->"
instead of "→"), which is useful in tests where locales might be
missing, and thus control via $LC_CTYPE is not reliable.
Use this in TEST-58, to ensure the output checks we do aren't confused
by missing these glyphs being unicode or not.
Diffstat (limited to 'test/units')
-rwxr-xr-x | test/units/testsuite-58.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index f41069ee04..8787a24c0e 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -14,6 +14,9 @@ fi export SYSTEMD_LOG_LEVEL=debug export PAGER=cat +# Disable use of special glyphs such as → +export SYSTEMD_UTF8=0 + seed=750b6cd5c4ae4012a15e7be3c29e6a47 if ! systemd-detect-virt --quiet --container; then @@ -327,7 +330,7 @@ EOF output=$(systemd-repart --definitions="$defs" --empty=create --size=100M --json=pretty "$imgs/zzz") - diff <(echo "$output") - <<EOF + diff -u <(echo "$output") - <<EOF [ { "type" : "swap", @@ -338,10 +341,10 @@ EOF "offset" : 1048576, "old_size" : 0, "raw_size" : 33554432, - "size" : "→ 32.0M", + "size" : "-> 32.0M", "old_padding" : 0, "raw_padding" : 0, - "padding" : "→ 0B", + "padding" : "-> 0B", "activity" : "create", "drop-in_files" : [ "$defs/root.conf.d/override1.conf", @@ -382,7 +385,7 @@ EOF output=$(systemd-repart --definitions="$defs/1" --definitions="$defs/2" --empty=create --size=100M --json=pretty "$imgs/zzz") - diff <(echo "$output") - <<EOF + diff -u <(echo "$output") - <<EOF [ { "type" : "swap", @@ -393,10 +396,10 @@ EOF "offset" : 1048576, "old_size" : 0, "raw_size" : 33554432, - "size" : "→ 32.0M", + "size" : "-> 32.0M", "old_padding" : 0, "raw_padding" : 0, - "padding" : "→ 0B", + "padding" : "-> 0B", "activity" : "create" }, { @@ -408,10 +411,10 @@ EOF "offset" : 34603008, "old_size" : 0, "raw_size" : 33554432, - "size" : "→ 32.0M", + "size" : "-> 32.0M", "old_padding" : 0, "raw_padding" : 0, - "padding" : "→ 0B", + "padding" : "-> 0B", "activity" : "create" } ] |