]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Skip tests that depend on link(2) not following symlinks.
authorJim Meyering <jim@meyering.net>
Fri, 3 Jul 1998 20:09:03 +0000 (20:09 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 3 Jul 1998 20:09:03 +0000 (20:09 +0000)
From Andreas Schwab.

tests/cp/same-file

index 82327d3431d6a3e972c31cd025823ced42525eed..616401bbe66249ff89b796b3a1a463b6aafa15d5 100755 (executable)
@@ -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)