Show More
|
1 | NO CONTENT: file renamed from tests/repr.py to tests/printrepr.py |
@@ -1,63 +1,63 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | # An attempt at more fully testing the hgweb web interface. |
|
3 | 3 | # The following things are tested elsewhere and are therefore omitted: |
|
4 | 4 | # - archive, tested in test-archive |
|
5 | 5 | # - unbundle, tested in test-push-http |
|
6 | 6 | # - changegroupsubset, tested in test-pull |
|
7 | 7 | |
|
8 | 8 | echo % Set up the repo |
|
9 | 9 | hg init test |
|
10 | 10 | cd test |
|
11 | 11 | mkdir da |
|
12 | 12 | echo foo > da/foo |
|
13 | 13 | echo foo > foo |
|
14 | 14 | hg ci -Ambase |
|
15 | 15 | hg tag 1.0 |
|
16 | 16 | echo another > foo |
|
17 | 17 | hg branch stable |
|
18 | 18 | hg ci -Ambranch |
|
19 | 19 | hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
20 | 20 | cat hg.pid >> $DAEMON_PIDS |
|
21 | 21 | |
|
22 | 22 | echo % Logs and changes |
|
23 | 23 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
24 | 24 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
25 | 25 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
26 | 26 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' |
|
27 | 27 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' |
|
28 | 28 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' |
|
29 | 29 | |
|
30 | 30 | echo % File-related |
|
31 | 31 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' |
|
32 | 32 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' |
|
33 | 33 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' |
|
34 | 34 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' |
|
35 | 35 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' |
|
36 | 36 | |
|
37 | 37 | echo % Overviews |
|
38 | 38 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
39 | 39 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/branches/?style=gitweb' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//" |
|
40 | 40 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' |
|
41 | 41 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' |
|
42 | 42 | |
|
43 | 43 | echo % capabilities |
|
44 | 44 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities' |
|
45 | 45 | echo % heads |
|
46 | 46 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads' |
|
47 | 47 | echo % lookup |
|
48 | 48 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=lookup&node=1' |
|
49 | 49 | echo % branches |
|
50 | 50 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' |
|
51 | 51 | echo % changegroup |
|
52 | 52 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \ |
|
53 | | $TESTDIR/repr.py | |
|
53 | | $TESTDIR/printrepr.py | |
|
54 | 54 | echo % stream_out |
|
55 | 55 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' |
|
56 | 56 | echo % failing unbundle, requires POST request |
|
57 | 57 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle' |
|
58 | 58 | |
|
59 | 59 | echo % Static files |
|
60 | 60 | "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' |
|
61 | 61 | |
|
62 | 62 | echo % ERRORS ENCOUNTERED |
|
63 | 63 | cat errors.log |
@@ -1,61 +1,61 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | cp "$TESTDIR"/../contrib/simplemerge . |
|
4 | 4 | |
|
5 | 5 | echo base > base |
|
6 | 6 | |
|
7 | 7 | echo local > local |
|
8 | 8 | cat base >> local |
|
9 | 9 | cp local orig |
|
10 | 10 | |
|
11 | 11 | cat base > other |
|
12 | 12 | echo other >> other |
|
13 | 13 | |
|
14 | 14 | echo '% changing local directly' |
|
15 | 15 | python simplemerge local base other && echo "merge succeeded" |
|
16 | 16 | cat local |
|
17 | 17 | cp orig local |
|
18 | 18 | |
|
19 | 19 | echo '% printing to stdout' |
|
20 | 20 | python simplemerge -p local base other |
|
21 | 21 | echo ' local:' |
|
22 | 22 | cat local |
|
23 | 23 | |
|
24 | 24 | echo '% conflicts' |
|
25 | 25 | cp base conflict-local |
|
26 | 26 | cp other conflict-other |
|
27 | 27 | echo not other >> conflict-local |
|
28 | 28 | echo end >> conflict-local |
|
29 | 29 | echo end >> conflict-other |
|
30 | 30 | python simplemerge -p conflict-local base conflict-other || echo "merge failed" |
|
31 | 31 | |
|
32 | 32 | echo '% --no-minimal' |
|
33 | 33 | python simplemerge -p --no-minimal conflict-local base conflict-other |
|
34 | 34 | |
|
35 | 35 | echo '% 1 label' |
|
36 | 36 | python simplemerge -p -L foo conflict-local base conflict-other |
|
37 | 37 | |
|
38 | 38 | echo '% 2 labels' |
|
39 | 39 | python simplemerge -p -L foo -L bar conflict-local base conflict-other |
|
40 | 40 | |
|
41 | 41 | echo '% too many labels' |
|
42 | 42 | python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other |
|
43 | 43 | |
|
44 | 44 | echo '% binary file' |
|
45 | 45 | python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()" |
|
46 | 46 | cat orig >> binary-local |
|
47 | 47 | python simplemerge -p binary-local base other |
|
48 | 48 | |
|
49 | 49 | echo '% binary file --text' |
|
50 | python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/repr.py | |
|
50 | python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/printrepr.py | |
|
51 | 51 | |
|
52 | 52 | echo '% help' |
|
53 | 53 | python simplemerge --help |
|
54 | 54 | |
|
55 | 55 | echo '% wrong number of arguments' |
|
56 | 56 | python simplemerge |
|
57 | 57 | |
|
58 | 58 | echo '% bad option' |
|
59 | 59 | python simplemerge --foo -p local base other |
|
60 | 60 | |
|
61 | 61 | exit 0 |
General Comments 0
You need to be logged in to leave comments.
Login now