diff options
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-x | tests/cp/same-file | 13 |
1 files changed, 7 insertions, 6 deletions
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) |