test-lib: check Bash version for '-x' without using shell arrays
[gitweb.git] / t / test-lib.sh
index 7740d511d289f44bb1313308fe49d5894f64b3c2..76f3e23dc6172e7c68e5284ebdf1e6ef86de9f98 100644 (file)
@@ -270,12 +270,12 @@ do
                # this test is marked as such, and ignore '-x' if it
                # isn't executed with a suitable Bash version.
                if test -z "$test_untraceable" || {
-                    test -n "$BASH_VERSION" && {
+                    test -n "$BASH_VERSION" && eval '
                       test ${BASH_VERSINFO[0]} -gt 4 || {
                         test ${BASH_VERSINFO[0]} -eq 4 &&
                         test ${BASH_VERSINFO[1]} -ge 1
                       }
-                    }
+                    '
                   }
                then
                        trace=t