diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Keep date-format=local-local from failing pages
The guard took local as a name that may carry the -local suffix, but
git reads local only as a whole alias of default-local and dies on
anything after it, so that one value turned every page into a 500.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0203-dates.sh | 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0203-dates.sh b/tests/t0203-dates.sh index 02f12f1..3c8ecab 100755 --- a/tests/t0203-dates.sh +++ b/tests/t0203-dates.sh @@ -80,6 +80,19 @@ test_expect_success 'an unknown date-format falls back to short' ' grep "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]<" tmp ' +test_expect_success 'a date-format git would refuse falls back to short' ' + daterc "enable-relative-dates=0" "date-format=local-local" && + dateq "url=dated/refs/" >tmp && + grep "^Status: 200" tmp && + grep "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]<" tmp +' + +test_expect_success 'date-format=local is the default format in local time' ' + daterc "enable-relative-dates=0" "date-format=local" && + dateq "url=dated/refs/" >tmp && + grep ">[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]* [0-9:]* [0-9]*<" tmp +' + test_expect_success 'date-format still formats the log fallback' ' daterc "date-format=rfc2822" && dateq "url=dated/log/" >tmp && |
