coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: adjust quoting in expected output to match new gnulib pol


From: Jim Meyering
Subject: [PATCH] tests: adjust quoting in expected output to match new gnulib policy
Date: Fri, 06 Jan 2012 11:14:13 +0100

FYI

The new quoting policy is inconsistent, since many diagnostics now use
quotes like this 'token', while quote ("foo") still produces `foo' in
the C locale.

I noticed when I started changing `...' to '...' everywhere in three
newly-failing tests, and was surprised to see that change introduce
new failures, where quote-emitted `...' failed to match my expectation
of '...'-everywhere.

For now, I've adapted coreutils' tests so that that they expect the
new, inconsistent output.


>From e8fb9b01699ee235fd4d3c6d0d413d40006a5014 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 6 Jan 2012 10:14:39 +0100
Subject: [PATCH] tests: adjust quoting in expected output to match new gnulib
 policy

* tests/misc/xstrtol: Use '...' to match new quoting in most places.
However, leave `9x' to match the sole comparison against output
from the quote function, which still uses `...'.
* tests/misc/sort-merge: Likewise, though here I had to leave
`...'-quoted output to match output from four tests.
* tests/pr/pr-tests: Convert a single `...' to '...'.
* gnulib: Update submodule to latest.
---
 gnulib                |    2 +-
 tests/misc/sort-merge |    4 ++--
 tests/misc/xstrtol    |    6 +++---
 tests/pr/pr-tests     |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnulib b/gnulib
index 943bf5a..4cde8fd 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 943bf5a92b5a7a3e4b3a7178654c5491244ee8aa
+Subproject commit 4cde8fd725bd3127532c7ff556095abdb511bc40
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge
index 618ab1d..3303d10 100755
--- a/tests/misc/sort-merge
+++ b/tests/misc/sort-merge
@@ -50,10 +50,10 @@ my @Tests =
               "$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}],
+        {ERR=>"$prog: invalid --batch-size argument '-1'\n"}, {EXIT=>2}],

      ['nmerge-nan', "-m --batch-size=a", @inputs,
-        {ERR=>"$prog: invalid --batch-size argument `a'\n"}, {EXIT=>2}],
+        {ERR=>"$prog: invalid --batch-size argument 'a'\n"}, {EXIT=>2}],

      ['nmerge-big', "-m --batch-size=$bigint", @inputs,
         {ERR_SUBST=>'s/(current rlimit is) \d+/$1/'},
diff --git a/tests/misc/xstrtol b/tests/misc/xstrtol
index 339bf8c..bdc7bff 100755
--- a/tests/misc/xstrtol
+++ b/tests/misc/xstrtol
@@ -30,13 +30,13 @@ my @Tests =
    # test-name, [option, option, ...] {OUT=>"expected-output"}

    ['inval-suffix', "--pages=${too_big}h", {EXIT => 1},
-    {ERR=>"$prog: invalid suffix in --pages argument `${too_big}h'\n"}],
+    {ERR=>"$prog: invalid suffix in --pages argument '${too_big}h'\n"}],

    ['too-big', "--pages=$too_big", {EXIT => 1},
-    {ERR=>"$prog: --pages argument `$too_big' too large\n"}],
+    {ERR=>"$prog: --pages argument '$too_big' too large\n"}],

    ['simply-inval', "--pages=x", {EXIT => 1},
-    {ERR=>"$prog: invalid --pages argument `x'\n"}],
+    {ERR=>"$prog: invalid --pages argument 'x'\n"}],

    ['inv-pg-range', "--pages=9x", {EXIT => 1},
     {ERR=>"$prog: invalid page range `9x'\n"}],
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests
index 5058b4a..0cfca13 100755
--- a/tests/pr/pr-tests
+++ b/tests/pr/pr-tests
@@ -392,7 +392,7 @@ my @tv = (
 # Before coreutils-5.3.1, --pages=1:-1 would be treated like
 # --pages=1:18446744073709551615.
 ['neg-page', '--pages=1:-1', '', '', 1,
- "$prog: invalid --pages argument `1:-1'\n"],
+ "$prog: invalid --pages argument '1:-1'\n"],

 # Up to coreutils-6.10, this would cause pr to decrement its
 # internal "input_position" below zero and sometimes segfault.
--
1.7.8.2.334.gd4e886



reply via email to

[Prev in Thread] Current Thread [Next in Thread]