sapling/tests/test-hgweb-filelog
Stefan Ring 171ebe0873 Improved hgweb test.
The hgweb fix in dc83349025f7 aimed at restoring the "back" link in hgweb's
filelog that has been lost in 81d0ede3de31. However, the previous version of
this test ran the filelog command on a file with only a single filelog entry.
In this case, the previous hgweb version did not exhibit the bug. The error
condition is now correctly tested with a filelog of 2 entries.
2009-01-12 13:20:09 +01:00

50 lines
983 B
Plaintext
Executable File

hg init test
cd test
echo b > b
hg ci -Am "b"
echo a > a
hg ci -Am "first a"
hg rm a
hg ci -m "del a"
echo b > a
hg ci -Am "second a"
hg rm a
hg ci -m "del2 a"
hg mv b c
hg ci -m "mv b"
echo c >> c
hg ci -m "change c"
hg log -p
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
cat hg.pid >> $DAEMON_PIDS
echo % tip - two revisions
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
echo % second version - two revisions
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
echo % first deleted - one revision
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
echo % first version - one revision
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
echo % before addition - error
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
echo % should show base link, use spartan because it shows it
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
echo % errors
cat errors.log