Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Give the symlink cycle a scan directory of its own
The expected count of 2 held only because earlier tests had made
a.git and b.git and one of them had dropped b.git's cgitrc.
| -rwxr-xr-x | tests/t0303-robustness.sh | 14 |
1 file changed, 11 insertions, 3 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 49e88ad..5ed40ba 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -236,9 +236,17 @@ test_expect_success 'with trust-scan-config the same repository serves html' ' ' test_expect_success SYMLINKS 'a symlink cycle under the scan path is entered once' ' - ln -s . scan/loop && - cgit_rc gitcfgrc "url=" >tmp && - test $(grep -c "toplevel-repo" tmp) = 2 + mkdir loopscan && + git clone -q --bare repos/rob/.git loopscan/r.git && + ln -s . loopscan/loop && + { + echo "virtual-root=/" && + echo "cache-size=0" && + echo "scan-path=$PWD/loopscan" + } >looprc && + cgit_ok looprc "url=" >tmp && + test_grep "<td class=.col-name toplevel-repo.><a href=./r.git/.>r.git</a>" tmp && + test $(grep -c "<tr class=.repo.>" tmp) = 1 ' test_expect_success 'a bare query parameter does not swallow the next one' ' |
