X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/afe04daa3380ae144c2c9b486674c98e5dd082a3..c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5:/tests/setup.sh diff --git a/tests/setup.sh b/tests/setup.sh index 9f66d89..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 <