sapling/tests
2005-08-12 16:10:09 -08:00
..
fish-merge Remove "export FOO=bar" bashism. 2005-07-29 14:54:36 +01:00
README Adapted README to new needs. 2005-07-29 15:11:34 +01:00
run-tests Cleaned up trap handling in run-tests, too. 2005-08-04 18:23:07 +01:00
test-backwards-remove Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-backwards-remove.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-bad-pull Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-bad-pull.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-basic Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-basic.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-bdiff Add a fast binary diff extension (not yet used) 2005-06-21 17:27:58 -08:00
test-bdiff.out Add a fast binary diff extension (not yet used) 2005-06-21 17:27:58 -08:00
test-clone Use sh instead of bash in tests. 2005-08-04 18:20:40 +01:00
test-clone-failure Use sh instead of bash in tests. 2005-08-04 18:20:40 +01:00
test-clone-failure.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-clone.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-conflict Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-conflict.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-copy Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-copy.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-diffdir Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-diffdir.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-empty-dir Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-empty-dir.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-flags Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-flags.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-help Further help improvements: 2005-08-06 15:43:12 +01:00
test-help.out Further help improvements: 2005-08-06 15:43:12 +01:00
test-hook Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-hook.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-hup update test-hup permissions 2005-07-06 22:37:06 -08:00
test-hup.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge1 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge1.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge2 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge2.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge3 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge3.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge4 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge4.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge5 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge5.out Update output for test-merge5. 2005-07-31 17:31:15 -08:00
test-merge6 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-merge6.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-merge-revert Removed special FIXME handling in run-tests, added bug info to .out files. 2005-08-04 18:13:17 +01:00
test-merge-revert2 Removed special FIXME handling in run-tests, added bug info to .out files. 2005-08-04 18:13:17 +01:00
test-merge-revert2.out Removed special FIXME handling in run-tests, added bug info to .out files. 2005-08-04 18:13:17 +01:00
test-merge-revert.out Removed special FIXME handling in run-tests, added bug info to .out files. 2005-08-04 18:13:17 +01:00
test-pull Make test-pull work on slow machines, where hg serve needs some time to start. 2005-07-23 17:09:37 +01:00
test-pull.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-push-warn Warn on pushing unsynced repo or adding new heads 2005-08-01 23:17:22 -08:00
test-push-warn.out Warn on pushing unsynced repo or adding new heads 2005-08-01 23:17:22 -08:00
test-rawcommit1 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-rawcommit1.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-simple-update Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-simple-update.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-tag Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-tag.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-tags Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-tags.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-undo Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-undo.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-unrelated-pull Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-unrelated-pull.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-up-local-change Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
test-up-local-change.out Updated output of tests. 2005-07-29 15:21:02 +01:00
test-walk Add unit tests for walk code. 2005-08-12 16:10:09 -08:00
test-walk.out Add unit tests for walk code. 2005-08-12 16:10:09 -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 -m "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 -m "test" -u test -d "0 0"

- diff will show the current time

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