automake-patches
[Top][All Lists]
Advanced

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

[PATCH] {tests-init} Tests defs: de-uglify code for requiring an XSI-cap


From: Stefano Lattarini
Subject: [PATCH] {tests-init} Tests defs: de-uglify code for requiring an XSI-capable shell.
Date: Sun, 12 Dec 2010 22:06:58 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

This is just a cosmetic patch.  I will push in 72 hours
(Wednesday evening) if nobody objects.

Regards,
   Stefano

-*-*-*-

Tests defs: de-uglify code for requiring an XSI-capable shell.

* tests/defs (xsi-shell): Use `foo', not `_am_dummy', as test
variable.  Use multiple eval where appropriate.  Indent using
only spaces, not tabs.
---
 ChangeLog  |    7 +++++++
 tests/defs |    9 ++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b3f0e49..9f46fc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-12  Stefano Lattarini  <address@hidden>
+
+       Tests defs: de-uglify code for requiring an XSI-capable shell.
+       * tests/defs (xsi-shell): Use `foo', not `_am_dummy', as test
+       variable.  Use multiple eval where appropriate.  Indent using
+       only spaces, not tabs.
+
 2010-11-12  Stefano Lattarini  <address@hidden>
 
        Tests required tools: also try `-v' option for GNU compilers.
diff --git a/tests/defs b/tests/defs
index 02f9ad0..0a1ae1e 100644
--- a/tests/defs
+++ b/tests/defs
@@ -297,11 +297,10 @@ do
     xsi-shell)
       # Try some XSI features.
       echo "$me: trying some XSI constructs"
-      ( _am_dummy="a/b/c"
-       test 
"${_am_dummy##*/},${_am_dummy%/*},${_am_dummy#??}"${_am_dummy%"$_am_dummy"}, \
-               = c,a/b,b/c, \
-       && eval 'test $(( 1 + 1 )) -eq 2 \
-       && test "${#_am_dummy}" -eq 5' ) || exit 77
+      ( foo="a/b/c"
+        test "${foo##*/},${foo%/*},${foo#??}"${foo%"$foo"}, = c,a/b,b/c, \
+          && eval 'test $(( 1 + 1 )) -eq 2' \
+          && eval 'test "${#foo}" -eq 5' ) || exit 77
       ;;
     *)
       # Generic case: the tool must support --version.
-- 
1.7.1




reply via email to

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