diff options
author | Jim Meyering <meyering@redhat.com> | 2011-02-20 11:15:38 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-03-26 14:20:28 +0100 |
commit | 07d4792620794da6bcc10728bd8c6118affb5b98 (patch) | |
tree | 8667429c5987ec37423f5db9140795adabe1bb65 | |
parent | 8d6290df9ff3688961b386c439f5f10b0aec1be1 (diff) | |
download | patch-07d4792620794da6bcc10728bd8c6118affb5b98.tar.gz |
maint: remove trailing blanks
* bootstrap.conf: Remove trailing blanks.
* tests/reject-format: Define a dummy, empty variable, and use it in
here-doc to protect required trailing blanks from accidental removal.
* tests/no-newline-triggers-assert: Likewise.
* tests/preserve-c-function-names: Likewise.
* tests/create-delete: Likewise.
* tests/global-reject-files: Complete a sentence that ended in a space.
-rw-r--r-- | bootstrap.conf | 6 | ||||
-rw-r--r-- | tests/create-delete | 6 | ||||
-rw-r--r-- | tests/global-reject-files | 2 | ||||
-rw-r--r-- | tests/no-newline-triggers-assert | 3 | ||||
-rw-r--r-- | tests/preserve-c-function-names | 6 | ||||
-rw-r--r-- | tests/reject-format | 14 |
6 files changed, 22 insertions, 15 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index f132349..b5c029c 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -69,20 +69,20 @@ xalloc # --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ # --flag=wrapf:1:c-format\\\ # ' -# +# # # If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" # # appears in configure.ac, exclude some unnecessary files. # # Without grep's -E option (not portable enough, pre-configure), # # the following test is ugly. Also, this depends on the existence # # of configure.ac, not the obsolescent-named configure.in. But if # # you're using this infrastructure, you should care about such things. -# +# # gettext_external=0 # grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && # gettext_external=1 # grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && # gettext_external=1 -# +# # if test $gettext_external = 1; then # # Gettext supplies these files, but we don't need them since # # we don't have an intl subdirectory. diff --git a/tests/create-delete b/tests/create-delete index 916ed42..17f38bf 100644 --- a/tests/create-delete +++ b/tests/create-delete @@ -65,10 +65,12 @@ cat > f.diff <<EOF EOF rm -f f +preserve_trailing_blank= + check 'patch -p0 < f.diff || echo "Status: $?"' <<EOF The next patch would delete the file f, -which does not exist! Assume -R? [n] -Apply anyway? [n] +which does not exist! Assume -R? [n] $preserve_trailing_blank +Apply anyway? [n] $preserve_trailing_blank Skipping patch. 1 out of 1 hunk ignored Status: 1 diff --git a/tests/global-reject-files b/tests/global-reject-files index 252a0c4..f97b268 100644 --- a/tests/global-reject-files +++ b/tests/global-reject-files @@ -4,7 +4,7 @@ # in any medium, are permitted without royalty provided the copyright # notice and this notice are preserved. -# More than one reject to +# More than one reject to the same file. . $srcdir/test-lib.sh diff --git a/tests/no-newline-triggers-assert b/tests/no-newline-triggers-assert index 7ae523c..9341f60 100644 --- a/tests/no-newline-triggers-assert +++ b/tests/no-newline-triggers-assert @@ -16,13 +16,14 @@ use_tmpdir echo one > f +preserve_trailing_blank= cat > f.diff <<EOF --- f +++ f @@ -1,2 +1,2 @@ -1 +1a - + $preserve_trailing_blank \ No newline at end of file EOF diff --git a/tests/preserve-c-function-names b/tests/preserve-c-function-names index 4345462..bce98e0 100644 --- a/tests/preserve-c-function-names +++ b/tests/preserve-c-function-names @@ -31,6 +31,8 @@ int foo() } EOF +preserve_trailing_blank= + diff -p -c -L a -L b a b > ab.diff touch c check 'patch c < ab.diff || cat c.rej' <<EOF @@ -43,13 +45,13 @@ Hunk #1 FAILED at 2. *** 2,6 **** { /* waste a line */ - + $preserve_trailing_blank ! return 1; } --- 2,6 ---- { /* waste a line */ - + $preserve_trailing_blank ! return 2; } EOF diff --git a/tests/reject-format b/tests/reject-format index 628873a..d680ee7 100644 --- a/tests/reject-format +++ b/tests/reject-format @@ -36,6 +36,8 @@ Hunk #1 FAILED at 2. Status: 1 EOF +preserve_trailing_blank= + check 'cat f.rej' <<EOF *** f.orig --- f @@ -43,14 +45,14 @@ check 'cat f.rej' <<EOF *** 2,7 **** 2 3 - + $preserve_trailing_blank ! 5 6 } --- 2,7 ---- 2 3 - + $preserve_trailing_blank ! 5a 6 } @@ -73,7 +75,7 @@ Index: f @@ -2,6 +2,6 @@ 2 3 - + $preserve_trailing_blank -5 +5a 6 @@ -96,7 +98,7 @@ check 'cat f.rej' <<EOF @@ -2,6 +2,6 @@ 2 3 - + $preserve_trailing_blank -5 +5a 6 @@ -121,14 +123,14 @@ Index: f *** 2,7 **** 2 3 - + $preserve_trailing_blank ! 5 6 } --- 2,7 ---- 2 3 - + $preserve_trailing_blank ! 5a 6 } |