2 # exercise the -m option
4 if test "$VERBOSE" = yes; then
9 . $srcdir/../envvar-check
12 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
13 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
14 trap '(exit $?); exit $?' 1 2 13 15
17 mkdir -p $tmp || framework_failure=1
18 cd $tmp || framework_failure=1
19 seq 2000 > b || framework_failure=1
20 touch a || framework_failure=1
22 if test $framework_failure = 1; then
23 echo "$0: failure in testing framework" 1>&2
29 # Before coreutils-5.1.1, the following would output a space after the comma.
30 ls -w2 -m a b > out || fail=1
32 # Before coreutils-5.1.1, the following would produce leading white space.
33 # All of the sed business is because the sizes are not portable.
34 ls -sm a b | sed 's/^[0-9]/0/;s/, [0-9][0-9]* b/, 12 b/' >> out || fail=1
35 cat <<\EOF > exp || fail=1
42 test $fail = 1 && diff out exp 2> /dev/null
44 (exit $fail); exit $fail