From: Jim Meyering Date: Sat, 8 Mar 2003 10:23:45 +0000 (+0000) Subject: Ensure that hard links _are_ listed twice when using --count-links. X-Git-Tag: COREUTILS-4_5_10~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04c9a5c2e49ea041a27e05a3a674f456614372c0;p=platform%2Fupstream%2Fcoreutils.git Ensure that hard links _are_ listed twice when using --count-links. --- diff --git a/tests/du/hard-link b/tests/du/hard-link index 7853cde..e94c7c5 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -1,6 +1,7 @@ #!/bin/sh # Ensure that hard-linked files are counted (and listed) only once. # Likewise for excluded directories. +# Ensure that hard links _are_ listed twice when using --count-links. if test "$VERBOSE" = yes; then set -x @@ -30,9 +31,16 @@ fi fail=0 du -a --exclude=sub dir | sed 's/^[0-9][0-9]* //' > out || fail=1 +echo === >> out +du --count-links -a --exclude=sub dir | sed 's/^[0-9][0-9]* //' >> out \ + || fail=1 cat <<\EOF > exp dir/f1 dir +=== +dir/f1 +dir/f2 +dir EOF cmp out exp || fail=1