]> git.cameronkatri.com Git - cgit.git/blobdiff - tests/setup.sh
tests: add tests for links with space in path and/or args
[cgit.git] / tests / setup.sh
index 9f66d899103cd9d9161c8639b2cbd5c6afd37f23..b2f1169c789846abc912c7429dee19dfb3c1487c 100755 (executable)
@@ -20,10 +20,10 @@ mkrepo() {
        name=$1
        count=$2
        dir=$PWD
-       test -d $name && return
+       test -d "$name" && return
        printf "Creating testrepo %s\n" $name
-       mkdir -p $name
-       cd $name
+       mkdir -p "$name"
+       cd "$name"
        git init
        n=1
        while test $n -le $count
@@ -50,6 +50,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 <<EOF
 virtual-root=/
 cache-root=$PWD/trash/cache
@@ -75,6 +76,10 @@ repo.desc=the bar repo
 repo.url=foo+bar
 repo.path=$PWD/trash/repos/foo+bar/.git
 repo.desc=the foo+bar repo
+
+repo.url=with space
+repo.path=$PWD/trash/repos/with space/.git
+repo.desc=spaced repo
 EOF
 }