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
# 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/^..............................................//'`"
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)
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)