mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: avoid non portable sed use of \t
* tests/du/threshold.sh: use `cut` rather than sed to avoid using the non portable \t which fails on sed on openbsd 5 at least. Also remove a redundant call to `tr` and avoid explicit setting of LANG=C which is done globally.
This commit is contained in:
1 parent
3025644443
commit
4f03385e9b
1 file changed
+2
-2
@@ -121,14 +121,14 @@ dutest ()
|
||||
if [ "$exp" = "" ] ; then
|
||||
touch exp
|
||||
else
|
||||
printf "%s " $exp | tr ' ' "\n" > exp
|
||||
printf "%s\n" $exp > exp
|
||||
fi
|
||||
|
||||
rc=0
|
||||
du -B1 $args a > out1 2>&1 || { cat out1 ; rc=1 ; }
|
||||
|
||||
# Remove the size column and sort the output.
|
||||
sed 's/^[0-9]*\t//' < out1 | LANG=C sort -o out || framework_failure_
|
||||
cut -f2- out1 | sort > out || framework_failure_
|
||||
|
||||
compare exp out || { cat out1 ; rc=1 ; }
|
||||
return $rc
|
||||
|
||||
Reference in new issue
Block a user