diff options
author | Pádraig Brady <P@draigBrady.com> | 2016-11-15 21:27:31 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-11-15 21:29:10 +0000 |
commit | 23a166d0e732b1a7b53848411635ca51844920a0 (patch) | |
tree | b6210c312ec468b733d4f39b999b2d850d077998 /tests/misc | |
parent | 1ba4cdb3e1c9134d0ab87e13c92cc7acf90f4249 (diff) | |
download | coreutils-23a166d0e732b1a7b53848411635ca51844920a0.tar.xz |
tests: fix false failure on OS X
* tests/misc/sort-h-thousands-sep.sh: The sv_SE locale
may be available while sv_SE.utf8 is not. Therefore
test and use the same locale, now definfed in a variable.
Reported by Jim Meyering.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/sort-h-thousands-sep.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/misc/sort-h-thousands-sep.sh b/tests/misc/sort-h-thousands-sep.sh index 3ffa89eeb..f14927ca2 100755 --- a/tests/misc/sort-h-thousands-sep.sh +++ b/tests/misc/sort-h-thousands-sep.sh @@ -19,8 +19,10 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ sort -test "$(LC_ALL=sv_SE locale thousands_sep)" = ' ' \ - || skip_ 'The Swedish locale with blank thousands separator is unavailable.' +TEST_LOCALE='sv_SE' + +test "$(LC_ALL="$TEST_LOCALE" locale thousands_sep)" = ' ' || + skip_ 'The Swedish locale with blank thousands separator is unavailable.' tee exp1 exp3 > in << _EOF_ 1 1k 1 M 4 003 1M @@ -41,7 +43,7 @@ cat > exp5 << _EOF_ _EOF_ for i in 1 2 3 5; do - LC_ALL="sv_SE.utf8" sort -h -k $i "in" > "out${i}" || fail=1 + LC_ALL="$TEST_LOCALE" sort -h -k $i "in" > "out${i}" || fail=1 compare "exp${i}" "out${i}" || fail=1 done |