]> gitweb.ps.run Git - ps-cgit/blobdiff - tests/setup.sh
ui-snapshot.c: change mime-type for tar.gz and tar.bz2
[ps-cgit] / tests / setup.sh
index 1457dd51ec948595ff9f73a758c01f04501347b4..30f90d5c39663166ad51e3c41995e255041420ee 100755 (executable)
@@ -25,11 +25,13 @@ mkrepo() {
        mkdir -p $name
        cd $name
        git init
-       for ((n=1; n<=count; n++))
+       n=1
+       while test $n -le $count
        do
                echo $n >file-$n
                git add file-$n
                git commit -m "commit $n"
+               n=$(expr $n + 1)
        done
        if test "$3" = "testplus"
        then
@@ -101,7 +103,7 @@ run_test()
 {
        desc=$1
        script=$2
-       ((test_count++))
+       test_count=$(expr $test_count + 1)
        printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log
        printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log
        eval "$2" >>test-output.log 2>>test-output.log
@@ -111,7 +113,7 @@ run_test()
        then
                printf " %2d) %-60s [ok]\n" $test_count "$desc"
        else
-               ((test_failed++))
+               test_failed=$(expr $test_failed + 1)
                printf " %2d) %-60s [failed]\n" $test_count "$desc"
        fi
 }