sapling/tests
mpm@selenic.com f2e850d62d update tests to reflect new short hash length
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

update tests to reflect new short hash length

manifest hash: 7ae99e74333416e8cbf8bc5d518bb5d3c449788b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCsQo8ywK+sNU5EO8RAltAAJ97yqgcTU0eYrQ2vpIq+hrfCfrsVwCggUk4
adIvEe7OzGeG6wn0/aRoQXY=
=h8+W
-----END PGP SIGNATURE-----
2005-06-15 21:12:28 -08:00
..
fish-merge Add some tests to the repo 2005-05-04 22:57:51 -08:00
README testing fixups 2005-06-14 13:44:37 -08:00
run-tests run-tests: run tests given on the command line 2005-06-15 15:50:28 -08:00
test-basic Add a simple testing framework 2005-06-14 13:28:42 -08:00
test-basic.out Add a simple testing framework 2005-06-14 13:28:42 -08:00
test-conflict merge3: fix argument order 2005-06-15 00:27:20 -08:00
test-conflict.out update tests to reflect new short hash length 2005-06-15 21:12:28 -08:00
test-copy Add hg copy 2005-06-15 15:57:07 -08:00
test-copy.out Add hg copy 2005-06-15 15:57:07 -08:00
test-help Add some more tests 2005-06-14 17:30:56 -08:00
test-help.out test-help: hg copy now shows up in the help 2005-06-15 15:58:11 -08:00
test-pull Add some more tests 2005-06-14 17:30:56 -08:00
test-pull.out Add some more tests 2005-06-14 17:30:56 -08:00
test-simple-update Add a simple testing framework 2005-06-14 13:28:42 -08:00
test-simple-update.out Add a simple testing framework 2005-06-14 13:28:42 -08:00
test-tags Add a tags/identify test group 2005-06-15 00:10:18 -08:00
test-tags.out update tests to reflect new short hash length 2005-06-15 21:12:28 -08:00
test-undo Add some more tests 2005-06-14 17:30:56 -08:00
test-undo.out Add some more tests 2005-06-14 17:30:56 -08:00
test-up-local-change testing fixups 2005-06-14 13:44:37 -08:00
test-up-local-change.out update tests to reflect new short hash length 2005-06-15 21:12:28 -08:00

A simple testing framework

To run the tests, do:

cd tests/
./run-tests

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 up -m want user interaction

  for commit use -t "text"
  for hg up -m, 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 -t "test" -u test -d "0 0"

- diff will show the current time

  use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates

- set -x and pipelines don't generate stable output

  turn off set -x or break pipelines into pieces