mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
tests: fix issues on alpine linux
* tests/misc/seq-epipe.sh: Remove stale comment. * tests/misc/sort-debug-warn.sh: musl doesn't indicate a set_locale() failure with missing locales, so avoid a test portion in that case. * tests/misc/wc-files0.sh: Avoid a bug on older ash implementations. Addresses http://bugs.gnu.org/28054
This commit is contained in:
parent
1d9765a764
commit
4b5bc5454e
@ -31,8 +31,6 @@ echo 1 > exp || framework_failure_
|
||||
compare exp out || fail=1
|
||||
compare exp code || fail=1
|
||||
|
||||
# The error message must begin with "standard output:"
|
||||
# (but don't hard-code the strerror text)
|
||||
grep '^seq: write error: ' err \
|
||||
|| { warn_ "seq emitted incorrect error on EPIPE"; \
|
||||
cat err;\
|
||||
|
||||
@ -70,9 +70,6 @@ sort: using simple byte comparison
|
||||
sort: using simple byte comparison
|
||||
17
|
||||
sort: using simple byte comparison
|
||||
18
|
||||
sort: failed to set locale
|
||||
sort: using simple byte comparison
|
||||
EOF
|
||||
|
||||
echo 1 >> out
|
||||
@ -109,15 +106,25 @@ echo 16 >> out
|
||||
sort -rM --debug /dev/null 2>>out #no warning
|
||||
echo 17 >> out
|
||||
sort -rM -k1,1 --debug /dev/null 2>>out #no warning
|
||||
echo 18 >> out
|
||||
LC_ALL=missing sort --debug /dev/null 2>>out.t
|
||||
# musl libc accepts "missing" and implicitly uses UTF8,
|
||||
# so adjust the expected message accordingly.
|
||||
sed 's/using .*missing.* sorting rules/using simple byte comparison/' \
|
||||
out.t >>out
|
||||
|
||||
compare exp out || fail=1
|
||||
|
||||
|
||||
cat <<\EOF > exp
|
||||
sort: failed to set locale
|
||||
sort: using simple byte comparison
|
||||
EOF
|
||||
|
||||
LC_ALL=missing sort --debug /dev/null 2>out
|
||||
|
||||
# musl libc maps unknown locales to the default utf8 locale
|
||||
# with no way to determine failures. This is discussed at:
|
||||
# http://www.openwall.com/lists/musl/2016/04/02/1
|
||||
if ! grep -E 'using .*(missing|C.UTF-8).* sorting rules' out; then
|
||||
compare exp out || fail=1
|
||||
fi
|
||||
|
||||
|
||||
cat <<\EOF > exp
|
||||
sort: using simple byte comparison
|
||||
sort: key 1 is numeric and spans multiple fields
|
||||
|
||||
@ -45,7 +45,7 @@ nlname='1
|
||||
2'
|
||||
touch "$nlname" || framework_failure_
|
||||
printf '%s\0' "$nlname" | wc --files0-from=- > out || fail=1
|
||||
printf '%s\n' "0 0 0 '1'$'\\n''2'" > exp || framework_failure_
|
||||
printf '%s\n' "0 0 0 '1'\$'\\n''2'" > exp || framework_failure_
|
||||
compare exp out || fail=1
|
||||
|
||||
# Ensure correct byte counts, which fails between v8.24 and v8.26 inclusive
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user