sapling/tests
Thomas Arendsen Hein 445e91b18a Fixed tests for displaying tags in hg history and hg parents.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fixed tests for displaying tags in hg history and hg parents.

manifest hash: 1ff138f68590e11a20e1f375c0c7293bdfb9f1fb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCsp/XW7P1GVgWeRoRAtS1AJ90tbAlt89jZr//nYMEgoVv2UL6GwCgih7L
yFwVR4cWpSGyrl0zvYM3AiU=
=6OjG
-----END PGP SIGNATURE-----
2005-06-17 11:03:03 +01: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 test suite: fix timezone problems and port collision problem 2005-06-16 08:37:15 -08:00
test-backwards-remove hg merge: fix time asymmetry bug with deleting files on update to past 2005-06-16 22:32:55 -08:00
test-backwards-remove.out hg merge: fix time asymmetry bug with deleting files on update to past 2005-06-16 22:32:55 -08:00
test-basic Add a simple testing framework 2005-06-14 13:28:42 -08:00
test-basic.out Fixed tests for displaying tags in hg history and hg parents. 2005-06-17 11:03:03 +01: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 Fixed tests for displaying tags in hg history and hg parents. 2005-06-17 11:03:03 +01: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 test suite: fix timezone problems and port collision problem 2005-06-16 08:37:15 -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 Fixed tests for displaying tags in hg history and hg parents. 2005-06-17 11:03:03 +01:00
test-up-local-change testing fixups 2005-06-14 13:44:37 -08:00
test-up-local-change.out Fixed tests for displaying tags in hg history and hg parents. 2005-06-17 11:03:03 +01: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