1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

tests: env: ensure non-utf8 name or value is supported

* tests/env/env.sh: Add a test case ensuring non-utf8 characters
in the name or value are supported.
This commit is contained in:
Pádraig Brady
2025-12-11 21:19:19 +00:00
parent 8a3c75c6d8
commit a68ffc7176

8
tests/env/env.sh vendored
View File

@@ -90,6 +90,14 @@ ENV_TEST1=b
EOF
compare exp out || fail=1
# env shouldn't care what encoding name or value is
for nv in 'NON_UTF8_TEST=\240' 'NON_UTF8_TEST\240=1'; do
env $(printf "$nv") env > all || fail=1
grep '^NON_UTF8_TEST' all | LC_ALL=C sort > out || framework_failure_
printf "$nv\\n" > exp || framework_failure_
compare exp out || fail=1
done
# PATH modifications affect exec.
mkdir unlikely_name || framework_failure_
cat <<EOF > unlikely_name/also_unlikely || framework_failure_