sapling/tests
2006-02-19 21:44:32 +01: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 fix run-tests' PYTHONPATH 2005-11-27 16:37:18 +01:00
test-addremove Added test for the currently broken addremove with the expected output. 2006-01-17 15:03:47 +01:00
test-addremove.out Added test for the currently broken addremove with the expected output. 2006-01-17 15:03:47 +01:00
test-archive make server tests use --daemon. 2006-02-17 21:55:33 -08:00
test-archive.out make server tests use --daemon. 2006-02-17 21:55:33 -08: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08: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 [PATCH] Print timezone offset when outputting dates 2005-08-19 23:23:42 -08: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-cat fix the cat command 2005-12-06 14:10:38 +01:00
test-cat.out add removed files to the changelog file list 2006-01-29 08:38:31 +13: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 Better error message (without /.hg appended) when repository is not found. 2005-12-15 16:19:23 +01:00
test-clone-r Added a test for clone -r. 2005-10-16 16:24:40 -07:00
test-clone-r.out Added a test for clone -r. 2005-10-16 16:24:40 -07:00
test-clone.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-commit only files in normal state should be marked as deleted 2005-11-02 16:08:48 -08:00
test-commit.out only files in normal state should be marked as deleted 2005-11-02 16:08:48 -08: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-confused-revert Add test-confused-revert, fix permissions on test-revert 2005-10-25 15:54:44 -07:00
test-confused-revert.out Add test-confused-revert, fix permissions on test-revert 2005-10-25 15:54:44 -07:00
test-copy The copy tests don't need to invoke cp any longer. 2005-09-14 16:31:03 -07:00
test-copy2 The copy tests don't need to invoke cp any longer. 2005-09-14 16:31:03 -07:00
test-copy2.out Fixed test-copy2 with only looking at copied files. 2005-08-28 16:37:24 +02:00
test-copy.out Removed forgotten debug print statement from commands.py and tests. 2005-08-25 16:00:08 +02:00
test-diffdir Fix diff against an empty file (issue124) and add a test for this. 2006-02-15 14:22:16 +01:00
test-diffdir.out Fix diff against an empty file (issue124) and add a test for this. 2006-02-15 14:22:16 +01:00
test-empty Add empty repo test 2005-09-23 17:52:15 -07: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-empty.out Add empty repo test 2005-09-23 17:52:15 -07:00
test-encode Add file encoding/decoding support 2005-09-15 02:59:16 -05:00
test-encode.out Add file encoding/decoding support 2005-09-15 02:59:16 -05:00
test-excessive-merge Refactor excessive merge detection, add test 2006-02-17 17:23:53 -06:00
test-excessive-merge.out Refactor excessive merge detection, add test 2006-02-17 17:23:53 -06:00
test-filebranch Clean up some merge logic 2005-08-23 02:19:38 -07:00
test-filebranch.out Update tests 2005-08-24 19:19:35 -07: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 Update tests 2005-08-24 19:19:35 -07:00
test-grep use posix compliant option for head 2005-11-13 16:25:45 +01:00
test-grep.out Add test-grep.out file for now. 2005-08-29 11:28:48 -07:00
test-help Further help improvements: 2005-08-06 15:43:12 +01:00
test-help.out fix test-help diff options. 2006-02-16 09:09:45 -08:00
test-hgignore make all commands be repo-wide by default 2005-12-01 10:51:45 -06:00
test-hgignore.out Adjusted test output to match new hgignore error messages. 2006-01-07 16:34:20 +01:00
test-hgrc make readconfig take a filename instead of a file pointer as argument 2005-10-27 13:40:56 -07:00
test-hgrc.out Add missing test output 2005-10-27 13:48:00 -07:00
test-hook add preoutgoing and outgoing hooks. 2006-02-17 08:26:21 -08:00
test-hook.out add preoutgoing and outgoing hooks. 2006-02-17 08:26:21 -08:00
test-hup update test-hup permissions 2005-07-06 22:37:06 -08:00
test-hup.out test-hup: hgrc no longer created at init 2005-09-15 14:06:58 -05:00
test-locate fix locate broken since fe09b9cb31e4 2006-01-16 15:51:09 +01:00
test-locate.out fix locate broken since fe09b9cb31e4 2006-01-16 15:51:09 +01:00
test-merge1 abort when merging two heads and repository has local changes 2005-12-14 22:19:03 -06:00
test-merge1.out abort when merging two heads and repository has local changes 2005-12-14 22:19:03 -06: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08: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 transitive copy/rename 2006-02-18 07:37:59 -08: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -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 Update tests 2005-08-24 19:19:35 -07:00
test-merge7 Make test-merge7 repeatable 2005-09-27 14:53:11 -07:00
test-merge7.out Make test-merge7 repeatable 2005-09-27 14:53:11 -07: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 test fixes for Solaris 2.6 2005-08-18 13:33:39 +01:00
test-merge-revert2.out Add new bdiff based unidiff generation. 2006-01-24 15:02:10 +13:00
test-merge-revert.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-notfound Addes test for error messages when operating on non-existing files. 2005-08-15 06:58:25 +01:00
test-notfound.out Fix up failing tests. 2005-09-01 07:37:49 -07:00
test-permissions Add permissions handling test 2005-11-03 00:45:54 -08:00
test-permissions.out Add permissions handling test 2005-11-03 00:45:54 -08:00
test-pull make server tests use --daemon. 2006-02-17 21:55:33 -08:00
test-pull-permission make test-pull-permission cleanup correctly in case of errors 2006-02-19 21:44:32 +01:00
test-pull-permission.out clone: fall back to pull if we can't lock the source repo 2005-09-14 15:48:34 -05:00
test-pull.out make server tests use --daemon. 2006-02-17 21:55:33 -08: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 Update tests 2005-08-24 19:19:35 -07:00
test-rawcommit1 Cleanup of tabs and trailing spaces. 2005-09-21 07:56:19 +02:00
test-rawcommit1.out deprecate the rawcommit command 2006-01-29 19:06:42 +13:00
test-remove hg log -p should show file deletions 2005-12-14 20:53:45 -06:00
test-remove.out add removed files to the changelog file list 2006-01-29 08:38:31 +13:00
test-rename transitive copy/rename 2006-02-18 07:37:59 -08:00
test-rename.out transitive copy/rename 2006-02-18 07:37:59 -08:00
test-revert fix handling of files of unsupported type in the walk code 2005-11-02 15:46:31 -08:00
test-revert-unknown Fix bug with co -C across branches, update tests 2005-09-13 18:38:27 -05:00
test-revert-unknown.out Adjusted all but one test output for the new behaviour of localrepo.changes() 2006-01-12 21:02:38 +01:00
test-revert.out fix handling of files of unsupported type in the walk code 2005-11-02 15:46:31 -08:00
test-ro-message Don't hard-code /tmp in test-ro-message 2006-02-17 17:41:18 -06:00
test-ro-message.out Test case for the misleading message on bad permissions. 2005-09-27 14:59:02 -07: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 run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-ssh Fixed two tests to run with bourne shell. 2005-08-30 19:42:58 +02:00
test-ssh.out Fixed two tests to run with bourne shell. 2005-08-30 19:42:58 +02:00
test-static-http Fixed test-static-http with http_proxy variable set again. 2005-11-03 18:59:36 +01:00
test-static-http.out Fix up static-http test 2005-09-23 19:46:43 -07:00
test-status Added test for relative paths and all status flags for 'hg status' 2006-01-17 16:00:55 +01:00
test-status.out Added test for relative paths and all status flags for 'hg status' 2006-01-17 16:00:55 +01:00
test-symlinks Adjusted all but one test output for the new behaviour of localrepo.changes() 2006-01-12 21:02:38 +01:00
test-symlinks.out Adjusted all but one test output for the new behaviour of localrepo.changes() 2006-01-12 21:02:38 +01:00
test-tag deprecate the use of 'hg tag NAME [REV]' 2006-01-29 17:12:31 +13:00
test-tag.out Added missing quote in warning text to tests, too. 2006-01-29 14:36:11 +01:00
test-tags run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-tags.out Clean up some merge logic 2005-08-23 02:19:38 -07: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 [PATCH] Print timezone offset when outputting dates 2005-08-19 23:23:42 -08:00
test-unrelated-pull Cleanup of tabs and trailing spaces. 2005-09-21 07:56:19 +02:00
test-unrelated-pull.out Update tests 2005-08-24 19:19:35 -07:00
test-up-local-change abort when using 'update -m' and this is not a merge 2006-02-01 08:46:24 +01:00
test-up-local-change.out abort when using 'update -m' and this is not a merge 2006-02-01 08:46:24 +01:00
test-update-reverse Remove deprecated commit -t option 2005-10-24 20:42:20 -07:00
test-update-reverse.out Remove deprecated commit -t option 2005-10-24 20:42:20 -07:00
test-walk make all commands be repo-wide by default 2005-12-01 10:51:45 -06:00
test-walk.out Make debugwalk strip trailing spaces and remove these from test-walk.out 2005-09-21 08:07:38 +02: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