Mercurial > public > mercurial-scm > hg
comparison tests/test-hgweb-commands @ 5590:05451f6b5f07
add more tests for hgweb commands
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 02 Dec 2007 23:26:40 +0100 |
parents | |
children | 6ae8ed59c7b4 |
comparison
equal
deleted
inserted
replaced
5586:b90b72729a72 | 5590:05451f6b5f07 |
---|---|
1 #!/bin/sh | |
2 # An attempt at more fully testing the hgweb web interface. | |
3 # The following things are tested elsewhere and are therefore omitted: | |
4 # - archive, tested in test-archive | |
5 # - unbundle, tested in test-push-http | |
6 # - changegroupsubset, tested in test-pull | |
7 | |
8 echo % Set up the repo | |
9 hg init test | |
10 cd test | |
11 mkdir da | |
12 echo foo > da/foo | |
13 echo foo > foo | |
14 hg ci -Ambase | |
15 hg tag 1.0 | |
16 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
17 cat hg.pid >> $DAEMON_PIDS | |
18 | |
19 echo % Logs and changes | |
20 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
21 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
22 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
23 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' | sed "s/[0-9]* years/many years/" | |
24 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' | |
25 | |
26 echo % File-related | |
27 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' | |
28 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' | |
29 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' | |
30 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' | |
31 | |
32 echo % Overviews | |
33 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" | |
34 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' | sed "s/[0-9]* years ago/long ago/" | |
35 | |
36 echo % Internals | |
37 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/capabilities' | |
38 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/heads' | |
39 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/lookup/1' | |
40 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/branches' | |
41 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/changegroup' | |
42 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/stream_out' | |
43 | |
44 echo % Static files | |
45 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' | |
46 | |
47 echo % ERRORS ENCOUNTERED | |
48 cat errors.log |