summaryrefslogtreecommitdiff
path: root/tests/misc/sort-merge
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-07 20:55:10 +0100
committerJim Meyering <meyering@redhat.com>2012-01-09 21:50:08 +0100
commitae2b0d2ddca458eb282bb0458987e75e1875a659 (patch)
treede928bfafb577a20963be45b4b6d97488c0b5e24 /tests/misc/sort-merge
parentdd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2 (diff)
downloadcoreutils-ae2b0d2ddca458eb282bb0458987e75e1875a659.tar.xz
tests: more automated quote adjustment
Relax initial regexp to match more instances, but add a filter to avoid some invalid conversions. Run this: git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \ -e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \ -e ' s/\`([^'\''"]*?'\'')/'\''$1/g' The last disjunct in the above (...) filter is to exempt any line that contains this string: '\'' With quoting like that, converting a ` to ' is likely to cause trouble, so we'll handle those manually. Here are three examples where the exemption is required: *': `link-to-dir/'\'': hard link not allowed for directory'*) ;; printf 'creating file `%s'\''\n' $f 'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
Diffstat (limited to 'tests/misc/sort-merge')
-rwxr-xr-xtests/misc/sort-merge12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge
index 3303d10af..8cdde1875 100755
--- a/tests/misc/sort-merge
+++ b/tests/misc/sort-merge
@@ -42,12 +42,12 @@ my @Tests =
# check validation of --batch-size option
['nmerge-0', "-m --batch-size=0", @inputs,
- {ERR=>"$prog: invalid --batch-size argument `0'\n".
- "$prog: minimum --batch-size argument is `2'\n"}, {EXIT=>2}],
+ {ERR=>"$prog: invalid --batch-size argument '0'\n".
+ "$prog: minimum --batch-size argument is '2'\n"}, {EXIT=>2}],
['nmerge-1', "-m --batch-size=1", @inputs,
- {ERR=>"$prog: invalid --batch-size argument `1'\n".
- "$prog: minimum --batch-size argument is `2'\n"}, {EXIT=>2}],
+ {ERR=>"$prog: invalid --batch-size argument '1'\n".
+ "$prog: minimum --batch-size argument is '2'\n"}, {EXIT=>2}],
['nmerge-neg', "-m --batch-size=-1", @inputs,
{ERR=>"$prog: invalid --batch-size argument '-1'\n"}, {EXIT=>2}],
@@ -57,7 +57,7 @@ my @Tests =
['nmerge-big', "-m --batch-size=$bigint", @inputs,
{ERR_SUBST=>'s/(current rlimit is) \d+/$1/'},
- {ERR=>"$prog: --batch-size argument `$bigint' too large\n".
+ {ERR=>"$prog: --batch-size argument '$bigint' too large\n".
"$prog: maximum --batch-size argument with current rlimit is\n"},
{EXIT=>2}],
@@ -68,7 +68,7 @@ my @Tests =
# temp files are needed
['nmerge-no', "-m --batch-size=2 -T$badtmp", @inputs,
{ERR_SUBST=>"s|': .*|':|"},
- {ERR=>"$prog: cannot create temporary file in `$badtmp':\n"},
+ {ERR=>"$prog: cannot create temporary file in '$badtmp':\n"},
{EXIT=>2}],
# This used to fail because setting batch-size without also setting