sapling/tests
2006-03-15 11:26:57 +01:00
..
fish-merge Remove "export FOO=bar" bashism. 2005-07-29 14:54:36 +01:00
md5sum.py clarify license on md5sum.py 2006-03-06 17:58:53 +01:00
README Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
run-tests tests: fix portability issue for echo -n 2006-03-14 21:42:32 -08:00
test-addremove Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +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 Merging with crew. 2006-03-06 08:47:16 -08:00
test-archive.out make server tests use --daemon. 2006-02-17 21:55:33 -08:00
test-backwards-remove Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-backwards-remove.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-bad-pull tests: more portability fix for the old systems 2006-03-15 11:09:24 +01:00
test-bad-pull.out tests: more portability fix for the old systems 2006-03-15 11:09:24 +01:00
test-basic Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-basic.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +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-cat Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-cat.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-clone changes by John Levon to standardize some erroroutput 2006-02-22 15:57:43 +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-pull-corruption Added test cases for repo corruption fixed in e2b47039575f (issue132) 2006-02-22 07:45:14 +01:00
test-clone-pull-corruption.out Added test cases for repo corruption fixed in e2b47039575f (issue132) 2006-02-22 07:45:14 +01:00
test-clone-r remove bashisms from tests 2006-03-12 08:08:22 +01:00
test-clone-r.out Added a test for clone -r. 2005-10-16 16:24:40 -07:00
test-clone.out changes by John Levon to standardize some erroroutput 2006-02-22 15:57:43 +01:00
test-command-template Use timestamps without leading 0 in test-command-template for portable tests. 2006-03-13 18:33:33 +01:00
test-command-template.out Use timestamps without leading 0 in test-command-template for portable tests. 2006-03-13 18:33:33 +01:00
test-commit Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-commit.out Updated test-commit to match changed output caused by nested transactions. 2006-02-28 23:19:47 +01:00
test-conflict Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-conflict.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-confused-revert Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-confused-revert.out Add test-confused-revert, fix permissions on test-revert 2005-10-25 15:54:44 -07:00
test-copy Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-diffdir Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-diffdir.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-empty Add empty repo test 2005-09-23 17:52:15 -07:00
test-empty-dir Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-empty-dir.out changes by John Levon to standardize some erroroutput 2006-02-22 15:57:43 +01:00
test-empty.out Add empty repo test 2005-09-23 17:52:15 -07:00
test-encode Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-encode.out Add file encoding/decoding support 2005-09-15 02:59:16 -05:00
test-excessive-merge Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-excessive-merge.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-filebranch Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-filebranch.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-flags Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-flags.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 Make the deprecated rawcommit an alias of debugrawcommit. 2006-03-01 09:14:25 +01: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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-hook.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-locate.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge1 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge1.out abort when merging two heads and repository has local changes 2005-12-14 22:19:03 -06:00
test-merge2 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge2.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-merge3 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge3.out transitive copy/rename 2006-02-18 07:37:59 -08:00
test-merge4 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge4.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-merge5 Don't require the "yes" command for test-merge5. 2006-03-15 11:26:57 +01:00
test-merge5.out run-tests: remove '+ hg' trick 2005-08-16 19:03:01 -08:00
test-merge6 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge6.out Update tests 2005-08-24 19:19:35 -07:00
test-merge7 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge7.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge-revert Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge-revert2 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge-revert2.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-merge-revert.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-permissions.out Add permissions handling test 2005-11-03 00:45:54 -08:00
test-pull Merging with crew. 2006-03-06 08:47:16 -08:00
test-pull-permission Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +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-pull-corruption Added test cases for repo corruption fixed in e2b47039575f (issue132) 2006-02-22 07:45:14 +01:00
test-pull-pull-corruption.out Added test cases for repo corruption fixed in e2b47039575f (issue132) 2006-02-22 07:45:14 +01:00
test-pull.out make server tests use --daemon. 2006-02-17 21:55:33 -08:00
test-push-hook-lock Create local ui object per repository, so .hg/hgrc don't get mixed. 2006-03-06 17:47:41 +01:00
test-push-hook-lock.out Create local ui object per repository, so .hg/hgrc don't get mixed. 2006-03-06 17:47:41 +01:00
test-push-r remove bashisms from tests 2006-03-12 08:08:22 +01:00
test-push-r.out add an optional argument to push only the specified revisions (push -r) 2006-02-14 21:11:57 +01:00
test-push-warn Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-push-warn.out Update tests 2005-08-24 19:19:35 -07:00
test-rawcommit1 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-rawcommit1.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-remove change default strftime format for better portability 2006-03-14 22:01:30 -08:00
test-remove.out change default strftime format for better portability 2006-03-14 22:01:30 -08:00
test-rename Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-rename.out copy/rename to a removed destination file 2006-02-28 23:47:40 -08:00
test-revert Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-revert-unknown Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-ssh.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-static-http tests: more portability fix for the old systems 2006-03-15 11:09:24 +01:00
test-static-http.out tests: more portability fix for the old systems 2006-03-15 11:09:24 +01:00
test-status Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +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 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-tag.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-tags Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-tags.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-undo Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-undo.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-unrelated-pull update test for unrelated repo. 2006-03-14 23:00:45 -08:00
test-unrelated-pull.out update test for unrelated repo. 2006-03-14 23:00:45 -08:00
test-up-local-change Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-up-local-change.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-update-reverse Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-update-reverse.out Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01:00
test-walk Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. 2006-03-13 13:05:41 +01: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 "1000000 0"

- diff will show the current time

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