X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/b6faa78091a1340b73e291f1f87604f246d3f391..61d4147ea2d58c9d129a084be13ccec6ae18b4d5:/tests/setup.sh diff --git a/tests/setup.sh b/tests/setup.sh index 30f90d5..e3c6c17 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -15,15 +15,16 @@ # run_test 'repo index' 'cgit_url "/" | tidy -e' # run_test 'repo summary' 'cgit_url "/foo" | tidy -e' +unset CDPATH mkrepo() { name=$1 count=$2 dir=$PWD - test -d $name && return - printf "Creating testrepo %s\n" $name - mkdir -p $name - cd $name + test -d "$name" && return + printf "Creating testrepo %s\n" "$name" + mkdir -p "$name" + cd "$name" git init n=1 while test $n -le $count @@ -40,7 +41,7 @@ mkrepo() { git commit -m "add a+b" git branch "1+2" fi - cd $dir + cd "$dir" } setup_repos() @@ -50,6 +51,7 @@ setup_repos() mkrepo trash/repos/foo 5 >/dev/null mkrepo trash/repos/bar 50 >/dev/null mkrepo trash/repos/foo+bar 10 testplus >/dev/null + mkrepo "trash/repos/with space" 2 >/dev/null cat >trash/cgitrc <>test-output.log 2>>test-output.log res=$? printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log - if test $res = 0 + if test $res = 0 -a $bug = 0 then printf " %2d) %-60s [ok]\n" $test_count "$desc" + elif test $res = 0 -a $bug = 1 + then + printf " %2d) %-60s [BUG FIXED]\n" $test_count "$desc" + elif test $bug = 1 + then + printf " %2d) %-60s [KNOWN BUG]\n" $test_count "$desc" else test_failed=$(expr $test_failed + 1) printf " %2d) %-60s [failed]\n" $test_count "$desc"