From: Jim Meyering Date: Sat, 19 Aug 2006 17:19:12 +0000 (+0000) Subject: * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix. X-Git-Tag: v6.1~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=674311d6d747f6b7c910c545d53557644797e67e;p=thirdparty%2Fcoreutils.git * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix. --- diff --git a/ChangeLog b/ChangeLog index a422e4c596..cbe595c4b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-08-19 Jim Meyering + * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix. + * README: Describe potential "pre-C99 build failure", and work-around. Some of my 2006-07-03 changes to tests/*/Makefile.am were being diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 5851fdc7e5..dad4552159 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -1,5 +1,7 @@ #!/bin/sh # Ensure that ls --file-type does not call stat unnecessarily. +# Also check for the dtype-related (and fs-type dependent) bug +# in coreutils-6.0 that made ls -CF columns misaligned. # Copyright (C) 2006 Free Software Foundation, Inc. @@ -57,6 +59,9 @@ mkdir d || framework_failure=1 ln -s / d/s || framework_failure=1 chmod 600 d || framework_failure=1 +mkdir -p e/a2345 e/b || framework_failure=1 +chmod 600 e || framework_failure=1 + if test $framework_failure = 1; then echo "$0: failure in testing framework" 1>&2 (exit 1); exit 1 @@ -72,4 +77,15 @@ EOF cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null +rm -f out exp +# Check for the ls -CF misaligned-columns bug: +ls -CF e > out || fail=1 + +# coreutils-6.0 would print two spaces after the first slash, +# rather than the appropriate TAB. +printf 'a2345/\tb/\n' > exp || fail=1 + +cmp out exp || fail=1 +test $fail = 1 && diff out exp 2> /dev/null + (exit $fail); exit $fail