From 5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 22 Aug 2009 18:56:06 +0200 Subject: 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 : $_' --- tests/cp/same-file | 80 +++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'tests/cp/same-file') 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/ *$//' -- cgit v1.2.3-54-g00ecf