sapling/tests
2005-07-26 19:03:45 -08:00
..
fish-merge Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
README Change sed patterns in tests to strip dates after spaces or tabs 2005-07-26 19:03:45 -08:00
run-tests Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-backwards-remove Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-backwards-remove.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05: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 Change all references to -t --text commit message to -m and --message. 2005-07-22 15:59:13 +01:00
test-basic.out Change all references to -t --text commit message to -m and --message. 2005-07-22 15:59:13 +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 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05: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 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-conflict Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-conflict.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-copy Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-copy.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-diffdir Change sed patterns in tests to strip dates after spaces or tabs 2005-07-26 19:03:45 -08:00
test-diffdir.out Update test-diffdir output 2005-07-02 13:39:40 -08: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 Remove empty directories on update 2005-07-02 15:38:16 -08:00
test-flags Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-flags.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-help A bunch of parsing/help updates 2005-07-03 11:47:45 -08:00
test-help.out Updated help strings and test-help: 2005-07-22 08:47:35 +01:00
test-hook Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-hook.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05: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 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge1.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge2 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge2.out Update tests to match new addremove chattiness. 2005-07-22 19:46:02 -08:00
test-merge3 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge3.out Update tests to match new addremove chattiness. 2005-07-22 19:46:02 -08:00
test-merge4 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge4.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge5 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge5.out Update tests to match new addremove chattiness. 2005-07-22 19:46:02 -08:00
test-merge6 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-merge6.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-pull Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-pull.out Update tests to match new addremove chattiness. 2005-07-22 19:46:02 -08:00
test-rawcommit1 Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-rawcommit1.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-simple-update Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-simple-update.out Update tests to match new addremove chattiness. 2005-07-22 19:46:02 -08:00
test-tag Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-tag.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-tags Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-tags.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-undo Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05:00
test-undo.out Update tests to use commit -m and default -u 2005-07-21 15:05:17 -05: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 Actually warn on pulling from an unrelated repository 2005-07-02 18:25:15 -08:00
test-up-local-change Change sed patterns in tests to strip dates after spaces or tabs 2005-07-26 19:03:45 -08:00
test-up-local-change.out Fix local file changes being ignored after non-branch merge 2005-07-23 10:00:56 -05: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/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" to strip
  dates

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

  turn off set -x or break pipelines into pieces