coreutils
[Top][All Lists]
Advanced

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

[PATCH] tests: correct reversed args to "compare"


From: Jim Meyering
Subject: [PATCH] tests: correct reversed args to "compare"
Date: Wed, 04 Apr 2012 14:33:29 +0200

I noticed the underlying problem with maint.mk when my new
backtick-prohibiting rule failed to detect the three offenders.
Once I fixed the problem by updating to newer gnulib with fixed
maint.mk, I found that "make syntax-check" failed with this:

    tests/misc/sort-discrim:36:compare out exp || fail=1
    tests/misc/sort-discrim:86:  compare out exp || fail=1
    maint.mk: reversed compare arguments
    make[3]: *** [sc_prohibit_reversed_compare_failure] Error 1


>From 89779e84970841708596223d6c85a7b58cb65878 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 4 Apr 2012 14:29:44 +0200
Subject: [PATCH 1/2] tests: correct reversed args to "compare"

* tests/misc/sort-discrim: Correct reversed args to "compare".
This nit was masked by a bug in maint.mk that effectively disabled
many of the syntax-check rules.
---
 tests/misc/sort-discrim |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/misc/sort-discrim b/tests/misc/sort-discrim
index 14ae6cc..fced204 100755
--- a/tests/misc/sort-discrim
+++ b/tests/misc/sort-discrim
@@ -33,7 +33,7 @@ getlimits_
 long_prefix='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
 seq -f "$long_prefix%5.0f" 10000 > exp || fail=1
 sort -R exp | LC_ALL=C sort > out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1


 # Test numeric sorting.
@@ -83,7 +83,7 @@ max_frac160=$(expr $INTMAX_MAX / 16 % 10) &&

 for opts in -n -h; do
   sort -R exp | LC_ALL=C sort $opts > out || fail=1
-  compare out exp || fail=1
+  compare exp out || fail=1
 done

 Exit $fail
--
1.7.9.3


>From 9cf086f31804c0fb1460e99080a12fb455659206 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 4 Apr 2012 14:05:44 +0200
Subject: [PATCH 2/2] build: update gnulib submodule to latest

---
 gnulib |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index 880a2f6..d4cecf1 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 880a2f6db9e37ef84347a47b15f88bef741c03da
+Subproject commit d4cecf1ee37f6b611ef092c9c7fa3761d02ce2c3
--
1.7.9.3



reply via email to

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