summaryrefslogtreecommitdiff
path: root/tests/cp/same-file
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-22 18:56:06 +0200
committerJim Meyering <meyering@redhat.com>2009-08-25 09:21:00 +0200
commit5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 (patch)
treee460d471f37f0dce1ba06f60f88114d1a65326c4 /tests/cp/same-file
parent2bc0f3caaafeb240cdcfd050b7ad1fe0ad14addf (diff)
downloadcoreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.xz
global: convert indentation-TABs to spaces
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-xtests/cp/same-file80
1 files changed, 40 insertions, 40 deletions
diff --git a/tests/cp/same-file b/tests/cp/same-file
index 1556011aa..6d57ebd6a 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -53,7 +53,7 @@ contents=XYZ
for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
for options in '' -d -f -df --rem -b -bd -bf -bdf \
- -l -dl -fl -dfl -bl -bdl -bfl -bdfl; do
+ -l -dl -fl -dfl -bl -bdl -bfl -bdfl; do
case $args$options in
# These tests are not portable.
# They all involve making a hard link to a symbolic link.
@@ -61,28 +61,28 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
# by doing "continue" here and eliminating the corresponding
# expected output lines below. Don't do that anymore.
'symlink foo'-dfl)
- continue;;
+ continue;;
'symlink foo'-bdl)
- continue;;
+ continue;;
'symlink foo'-bdfl)
- continue;;
+ continue;;
'sl1 sl2'-dfl)
- continue;;
+ continue;;
'sl1 sl2'-bd*l)
- continue;;
+ continue;;
'sl1 sl2'-dl)
- continue;;
+ continue;;
esac
# cont'd Instead, skip them only on systems for which link does
# dereference a symlink. Detect and skip such tests here.
case $hard_link_to_symlink_does_the_deref:$args:$options in
'yes:sl1 sl2:-fl')
- continue ;;
+ continue ;;
'yes:sl1 sl2:-bl')
- continue ;;
+ continue ;;
'yes:sl1 sl2:-bfl')
- continue ;;
+ continue ;;
esac
rm -rf dir
@@ -95,37 +95,37 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
case "$args" in *sl2*) ln -s foo sl2;; esac
(
(
- # echo 1>&2 cp $options $args
- cp $options $args 2>_err
- echo $? $options
-
- # Normalize the program name and diagnostics in the error output,
- # and put brackets around the output.
- if test -s _err; then
- sed '
- s/^[^:]*:\([^:]*\).*/cp:\1/
- 1s/^/[/
- $s/$/]/
- ' _err
+ # echo 1>&2 cp $options $args
+ cp $options $args 2>_err
+ echo $? $options
+
+ # Normalize the program name and diagnostics in the error output,
+ # and put brackets around the output.
+ if test -s _err; then
+ sed '
+ s/^[^:]*:\([^:]*\).*/cp:\1/
+ 1s/^/[/
+ $s/$/]/
+ ' _err
fi
- # Strip off all but the file names.
- ls=`ls -gG --ignore=_err . \
- | sed \
- -e '/^total /d' \
- -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`
- echo "($ls)"
- # Make sure the original is unchanged and that
- # the destination is a copy.
- for f in $args; do
- if test -f $f; then
- case "`cat $f`" in
- "$contents") ;;
- *) echo cp FAILED;;
- esac
- else
- echo symlink-loop
- fi
- done
+ # Strip off all but the file names.
+ ls=`ls -gG --ignore=_err . \
+ | sed \
+ -e '/^total /d' \
+ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`
+ echo "($ls)"
+ # Make sure the original is unchanged and that
+ # the destination is a copy.
+ for f in $args; do
+ if test -f $f; then
+ case "`cat $f`" in
+ "$contents") ;;
+ *) echo cp FAILED;;
+ esac
+ else
+ echo symlink-loop
+ fi
+ done
) | tr '\n' ' '
echo
) | sed 's/ *$//'