sapling/tests
2005-07-20 03:43:05 -08:00
..
fish-merge Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
README testing fixups 2005-06-14 13:44:37 -08:00
run-tests Add username/merge/editor to .hgrc 2005-07-03 21:51:09 -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-bad-pull Fixed tests. 2005-07-14 08:57:54 +01:00
test-bad-pull.out Fixed tests. 2005-07-14 08:57:54 +01:00
test-basic Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-basic.out Removed extra newline in hg log when not using the --patch option, fixed tests. 2005-07-14 10:37:33 +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 [PATCH] Tests for clone command 2005-06-30 23:51:25 -08:00
test-clone-failure [PATCH] Tests for clone command 2005-06-30 23:51:25 -08:00
test-clone-failure.out Update tests 2005-07-06 22:27:25 -08:00
test-clone.out Remove references to 'cloning by hardlink' from tests. 2005-07-10 16:17:05 -08:00
test-conflict options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-conflict.out options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-copy options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-copy.out Removed extra newline in hg log when not using the --patch option, fixed tests. 2005-07-14 10:37:33 +01:00
test-diffdir Refactor diffrevs/diffdir into changes 2005-06-30 20:54:01 -08:00
test-diffdir.out Update test-diffdir output 2005-07-02 13:39:40 -08:00
test-empty-dir Remove empty directories on update 2005-07-02 15:38:16 -08:00
test-empty-dir.out Remove empty directories on update 2005-07-02 15:38:16 -08:00
test-flags options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-flags.out Removed extra newline in hg log when not using the --patch option, fixed tests. 2005-07-14 10:37:33 +01:00
test-help A bunch of parsing/help updates 2005-07-03 11:47:45 -08:00
test-help.out Update tests to reflect walk changes. 2005-07-20 03:43:05 -08:00
test-hook Add initial hook support 2005-06-27 22:18:12 -08:00
test-hook.out Add initial hook support 2005-06-27 22:18:12 -08:00
test-hup update test-hup permissions 2005-07-06 22:37:06 -08:00
test-hup.out Update tests 2005-07-06 22:27:25 -08:00
test-merge1 Fix up test-merge1 2005-06-21 21:07:08 -08:00
test-merge1.out Fix up test-merge1 2005-06-21 21:07:08 -08:00
test-merge2 Pick up tests from previous patch 2005-06-21 18:51:06 -08:00
test-merge2.out Pick up tests from previous patch 2005-06-21 18:51:06 -08:00
test-merge3 [PATCH] (3/4) Removing an added file 2005-06-21 17:50:37 -08:00
test-merge3.out [PATCH] (3/4) Removing an added file 2005-06-21 17:50:37 -08:00
test-merge4 [PATCH] Removal of a file added by merging branches 2005-06-21 19:19:39 -08:00
test-merge4.out [PATCH] Removal of a file added by merging branches 2005-06-21 19:19:39 -08:00
test-merge5 [PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted 2005-06-21 19:14:11 -08:00
test-merge5.out Fix zombie files in merge 2005-07-04 12:38:34 -08:00
test-merge6 update tests 2005-07-04 12:54:42 -08:00
test-merge6.out Remove references to 'cloning by hardlink' from tests. 2005-07-10 16:17:05 -08:00
test-pull Update tests 2005-07-06 22:27:25 -08:00
test-pull.out Update tests 2005-07-06 22:27:25 -08:00
test-rawcommit1 options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-rawcommit1.out options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-simple-update Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-simple-update.out Remove references to 'cloning by hardlink' from tests. 2005-07-10 16:17:05 -08:00
test-tag From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> 2005-06-21 17:47:28 -08:00
test-tag.out Removed extra newline in hg log when not using the --patch option, fixed tests. 2005-07-14 10:37:33 +01:00
test-tags Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-tags.out Fix dodiff/changes 2005-07-01 11:24:09 -08:00
test-undo Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-undo.out Update undo test 2005-06-28 02:04:49 -08:00
test-unrelated-pull Actually warn on pulling from an unrelated repository 2005-07-02 18:25:15 -08:00
test-unrelated-pull.out Actually warn on pulling from an unrelated repository 2005-07-02 18:25:15 -08:00
test-up-local-change options: kill -d for debug 2005-07-02 22:54:35 -08:00
test-up-local-change.out Removed extra newline in hg log when not using the --patch option, fixed tests. 2005-07-14 10:37:33 +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