comparison tests/README @ 331:55f63f3b6a54

Add a simple testing framework -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Add a simple testing framework manifest hash: 9eeea72f2f33438040998a190183958764232ece -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCr0wKywK+sNU5EO8RAl9FAJ4o1QUA/YE2hCSlUPngR8h30hT1xQCgoEhu um2QkJOc2Rz7i6xTGPxuqzU= =YyUM -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 14 Jun 2005 13:28:42 -0800
parents
children 6c869059beb4
comparison
equal deleted inserted replaced
330:27d08c0c2a7e 331:55f63f3b6a54
1 A simple testing framework
2
3 This finds all scripts in the test directory named test-* and executes
4 them. The scripts can be either shell scripts or Python. Each test is
5 run in a temporary directory that is removed when the test is complete.
6
7 A test-<x> succeeds if the script returns success and its output
8 matches test-<x>.out. If the new output doesn't match, it is stored in
9 test-<x>.err.
10
11 There are some tricky points here that you should be aware of when
12 writing tests:
13
14 - hg commit and hg up -m want user interaction
15
16 for commit use -t "text"
17 for hg up -m, set HGMERGE to something noninteractive (like true or merge)
18
19 - changeset hashes will change based on user and date which make
20 things like hg history output change
21
22 use commit -t "test" -u test -d "0 0"
23
24 - diff will show the current time
25
26 use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates
27