Mercurial > hg
view tests/test-hgweb @ 5689:c2d0ed7f4af8
Move diffing missing file test and remove test-notfound
No point to have a test dedicated to this diff behaviour.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 24 Dec 2007 12:22:33 +0100 |
parents | f429e0e067a8 |
children | 1b365c5723bc |
line wrap: on
line source
#!/bin/sh # Some tests for hgweb. Tests static files, plain files and different 404's. hg init test cd test mkdir da echo foo > da/foo echo foo > foo hg ci -Ambase -d '0 0' hg serve -p $HGPORT -d --pid-file=hg.pid cat hg.pid >> $DAEMON_PIDS echo % manifest ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw') ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw') echo % plain file "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw' echo % should give a 404 - static file that does not exist "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus' echo % should give a 404 - bad revision "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw' echo % should give a 400 - bad command "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' | sed 's/400.*/400/' echo % should give a 404 - file does not exist "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw' echo % static file "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'