Source

hg-stable / tests /

The default branch has multiple heads

Filename Size Date modified Message
..
952 B
32.8 KB
1.5 KB
527 B
781 B
10.5 KB
197 B
232 B
1.3 KB
1.2 KB
1.5 KB
1.7 KB
201 B
73 B
672 B
93 B
127 B
318 B
799 B
380 B
1.1 KB
4.7 KB
242 B
62 B
302 B
464 B
225 B
619 B
481 B
838 B
5.0 KB
442 B
2.0 KB
5.0 KB
407 B
416 B
163 B
154 B
289 B
367 B
746 B
711 B
701 B
1.4 KB
696 B
1014 B
362 B
507 B
1.9 KB
2.4 KB
161 B
219 B
434 B
258 B
60 B
281 B
107 B
868 B
1.9 KB
143 B
440 B
249 B
522 B
2.3 KB
1.4 KB
3.0 KB
378 B
1.3 KB
1.2 KB
7.2 KB
483 B
229 B
143 B
11.5 KB
770 B
344 B
106 B
114 B
4.9 KB
5.8 KB
621 B
1.2 KB
1.4 KB
958 B
146 B
104 B
1.9 KB
3.0 KB
1.0 KB
7.2 KB
1.2 KB
1.4 KB
436 B
288 B
157 B
160 B
615 B
625 B
848 B
871 B
1.9 KB
1.1 KB
856 B
225 B
158 B
27 B
335 B
177 B
439 B
252 B
708 B
981 B
891 B
2.4 KB
245 B
135 B
201 B
259 B
3.4 KB
6 B
467 B
614 B
1.2 KB
283 B
320 B
416 B
271 B
169 B
335 B
747 B
734 B
418 B
601 B
761 B
293 B
287 B
1.4 KB
888 B
886 B
4.5 KB
677 B
1.5 KB
664 B
1.7 KB
371 B
1.4 KB
4.1 KB
7.0 KB
1.4 KB
268 B
134 B
1.0 KB
420 B
191 B
161 B
446 B
237 B
820 B
1.6 KB
2.6 KB
873 B
616 B
913 B
1.4 KB
1.2 KB
421 B
493 B
1.1 KB
986 B
1.8 KB
1.7 KB
484 B
217 B
529 B
1.1 KB
4.0 KB
474 B
1.3 KB
1.3 KB
3.6 KB
713 B
354 B
4.4 KB
A simple testing framework

To run the tests, do:

cd tests/
python run-tests.py

This finds all scripts in the test directory named test-* and executes
them. The scripts can be either shell scripts or Python. Each test is
run in a temporary directory that is removed when the test is complete.

A test-<x> succeeds if the script returns success and its output
matches test-<x>.out. If the new output doesn't match, it is stored in
test-<x>.err.

There are some tricky points here that you should be aware of when
writing tests:

- hg commit and hg merge want user interaction

  for commit use -m "text"
  for hg merge, set HGMERGE to something noninteractive (like true or merge)

- changeset hashes will change based on user and date which make
  things like hg history output change

  use commit -m "test" -u test -d "1000000 0"

- diff will show the current time

  use hg diff | sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" to strip
  dates