Diff options
| -rwxr-xr-x | tests/t0303-robustness.sh | 17 |
1 file changed, 7 insertions, 10 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 6053de0..365c968 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -504,19 +504,16 @@ test_expect_success 'a filter pipeline sees the default SIGPIPE disposition' ' test_path_is_missing outlived ' +# Such a branch is refused as a head, so the fallback passes over it, and the +# switcher must not offer a choice that can only lead to an error page. test_expect_success 'the fallback branch skips a name spelled like an option' ' git -C repos/rob update-ref refs/heads/-first HEAD && + test_when_finished "git -C repos/rob update-ref -d refs/heads/-first" && git -C repos/rob symbolic-ref HEAD refs/heads/gone && - cgit_rc robrc "url=rob/" >tmp && - git -C repos/rob symbolic-ref HEAD refs/heads/master && - grep "^Status: 200" tmp -' - -# Such a branch is refused as a head, so the switcher must not offer a -# choice that can only lead to an error page. -test_expect_success 'the branch switcher leaves out a name spelled like an option' ' - grep "<option value=.master." tmp && - ! grep "<option value=.-first." tmp + test_when_finished "git -C repos/rob symbolic-ref HEAD refs/heads/master" && + cgit_ok robrc "url=rob/" >tmp && + test_grep "<option value=.master. selected>" tmp && + test_grep ! "<option value=.-first." tmp ' test_expect_success 'a blank line in the mimetype file is skipped' ' |
