test-lib: fix non-portable pattern bracket expressions
[gitweb.git] / t / test-lib.sh
index 77eff04c92ab183c992e871aa34720f2d78014b1..4e7cb52b57a59b76404f701a542fc58ce06ec685 100644 (file)
@@ -144,7 +144,7 @@ do
        --stress=*)
                stress=${opt#--*=}
                case "$stress" in
-               *[^0-9]*|0*|"")
+               *[!0-9]*|0*|"")
                        echo "error: --stress=<N> requires the number of jobs to run" >&2
                        exit 1
                        ;;
@@ -155,7 +155,7 @@ do
        --stress-limit=*)
                stress_limit=${opt#--*=}
                case "$stress_limit" in
-               *[^0-9]*|0*|"")
+               *[!0-9]*|0*|"")
                        echo "error: --stress-limit=<N> requires the number of repetitions" >&2
                        exit 1
                        ;;