From 6191d1839ae99ad917f6584739c9543cb1de2ff7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 3 Jul 1998 20:09:03 +0000 Subject: Skip tests that depend on link(2) not following symlinks. From Andreas Schwab. --- tests/cp/same-file | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/cp') diff --git a/tests/cp/same-file b/tests/cp/same-file index 82327d343..616401bbe 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -30,6 +30,10 @@ contents=XYZ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do for options in '' -d -f -df -b -bd -bf -bdf \ -l -dl -fl -dfl -bl -bdl -bfl -bdfl; do + case $args$options in 'sl1 sl2'-bd*l) + # This test is not portable. + continue + esac rm -rf dir mkdir dir cd dir @@ -47,8 +51,7 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do # and put brackets around the output. test -s .err && echo "[`sed 's/^[^:][^:]*:/cp:/' .err`]" # Strip off all but the file names. - exclude=`echo " .err"|sed 's/ / --ignore=/g'` - ls="`ls -lG $exclude . \ + ls="`ls -lG --ignore=.err . \ | sed \ -e '/^total /d' \ -e 's/^..............................................//'`" @@ -104,9 +107,9 @@ cat <<\EOF > $expected 0 -fl (foo symlink -> foo) 0 -dfl (foo symlink -> foo) 0 -bl (foo symlink -> foo) -0 -bdl (foo -> foo foo.~1~ symlink -> foo) symlink-loop symlink-loop +0 -bdl (foo symlink -> foo) 0 -bfl (foo symlink -> foo) -0 -bdfl (foo -> foo foo.~1~ symlink -> foo) symlink-loop symlink-loop +0 -bdfl (foo symlink -> foo) 1 [cp: `foo' and `foo' are the same file] (foo) 1 -d [cp: `foo' and `foo' are the same file] (foo) @@ -138,9 +141,7 @@ cat <<\EOF > $expected 0 -fl (foo sl1 -> foo sl2 -> foo) 0 -dfl (foo sl1 -> foo sl2 -> foo) 0 -bl (foo sl1 -> foo sl2 -> foo) -0 -bdl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) 0 -bfl (foo sl1 -> foo sl2 -> foo) -0 -bdfl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo) 1 [cp: `foo' and `hardlink' are the same file] (foo hardlink) 1 -d [cp: `foo' and `hardlink' are the same file] (foo hardlink) -- cgit v1.2.3-70-g09d2