sapling/tests
Thomas Arendsen Hein 51ae3ccedf Remove bashisms and use /bin/sh instead of /bin/bash.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Remove bashisms and use /bin/sh instead of /bin/bash.

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

iD8DBQFCxOEjW7P1GVgWeRoRAm9XAJ9IjlbMerPYEhKQQu7Ufcm6630cDwCfdXJ3
865XH6YVMuCYNjf3eibwQaM=
=r3gh
-----END PGP SIGNATURE-----
2005-07-01 07:22:27 +01: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 Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01: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 Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-bad-pull.out Fix up test-bad-pull output 2005-06-29 14:09:33 -08:00
test-basic Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-basic.out Fixed tests for displaying tags in hg history and hg parents. 2005-06-17 11:03:03 +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-conflict Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-conflict.out Tidy up conflict and pull tests 2005-06-17 08:50:55 -08:00
test-copy Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-copy.out Fix pipe timing for copy test 2005-06-24 23:00:19 -08:00
test-flags Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags. 2005-06-27 06:41:28 +01:00
test-flags.out Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags. 2005-06-27 06:41:28 +01:00
test-help Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-help.out [PATCH] replace history with log 2005-06-28 02:48:21 -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-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 [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-pull Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-pull.out Fix empty pull bug that appeared this morning 2005-06-29 13:48:57 -08:00
test-rawcommit1 Add rawcommit tests 2005-06-23 13:34:13 -08:00
test-rawcommit1.out Make show_changeset show added and deleted files in verbose mode. 2005-06-27 06:17:28 +01: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 [PATCH] add clone command 2005-06-26 15:20:46 -08:00
test-tag From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> 2005-06-21 17:47:28 -08:00
test-tag.out From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> 2005-06-21 17:47:28 -08:00
test-tags Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-tags.out [PATCH] Set locale before run-tests does anything 2005-06-27 22:22:13 -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-up-local-change Remove bashisms and use /bin/sh instead of /bin/bash. 2005-07-01 07:22:27 +01:00
test-up-local-change.out Fixed test for previous change of 'hg -v history'. 2005-06-28 07:05:55 +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