sapling/tests
Alexis S. L. Carvalho e488c0e84f Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root".  It now returns
an absolute path.

The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
..
binfile.bin Add test for git binary diff support 2006-10-12 09:17:16 -07:00
coverage.py Unified #! paths for python scripts and removed them for test modules. 2007-03-01 22:15:17 +01:00
get-with-headers.py Add a test for getting raw files via the web UI. 2006-06-29 16:44:23 -07:00
legacy-encoding.hg Fixes test-encoding for python2.3 and minor cleanups: 2006-12-09 11:16:27 +01:00
md5sum.py Unified #! paths for python scripts and removed them for test modules. 2007-03-01 22:15:17 +01:00
README Add -D/--nodates options to hg diff/export that removes dates from diff headers 2006-09-26 00:05:24 +01:00
run-tests.py tests: set a default encoding for running tests (ASCII) 2006-12-03 16:16:33 -06:00
test-abort-checkin Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-abort-checkin.out Add test mq keeping a reference to localrepo which can't remove journal on exit. 2006-07-28 08:59:06 +02:00
test-acl Don't use test -e in tests - sh doesn't like it on Solaris 2006-10-18 18:47:50 -03:00
test-acl.out Show number (-v) and list (--debug) of changesets with bundle/pull/push etc. 2006-10-25 18:45:18 +02:00
test-addremove addremove: add -s/--similarity option 2006-08-18 22:13:58 -07:00
test-addremove.out addremove: add -s/--similarity option 2006-08-18 22:13:58 -07:00
test-annotate Test annotate using named rev instead of linkrev 2006-10-15 20:57:30 -07:00
test-annotate.out Test annotate using named rev instead of linkrev 2006-10-15 20:57:30 -07:00
test-archive tests: add timeouts, make run-tests.py clean up dead daemon processes 2006-07-06 11:45:34 -07:00
test-archive.out addremove: do not deprecate. 2006-07-23 09:04:14 -07:00
test-backout backout: allow backout of merge changeset with --parent option. 2006-07-14 23:19:15 -07:00
test-backout.out fix output of test-backout. 2006-08-04 10:37:40 -07: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 Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-bad-extension load extensions only after the ui object has been completely initialized 2006-08-22 22:49:30 -03:00
test-bad-extension.out load extensions only after the ui object has been completely initialized 2006-08-22 22:49:30 -03:00
test-bad-pull Don't use test -e in tests - sh doesn't like it on Solaris 2006-10-18 18:47:50 -03:00
test-bad-pull.out Update keepalive.py to current CVS version of urlgrabber. 2006-06-16 10:00:37 -03:00
test-basic make manifest friendlier 2006-11-30 22:38:48 -06:00
test-basic.out Show repo's revlog format on verify only if it doesn't match the default format. 2006-04-28 21:52:08 +02: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-bisect Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-bisect.out tests: new test for the bisect extension 2006-08-15 21:49:49 +03:00
test-branch hg merge: fix lookup of branch 2006-09-08 02:16:16 +02:00
test-branch.out Deprecate old --branch/branches options 2006-10-24 17:07:11 -05:00
test-bundle add test for 8d53ef723a6c 2007-01-15 16:13:50 -02:00
test-bundle-r switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-bundle-r.out bundle --base: use the right set for the base 2006-10-09 15:44:20 +02:00
test-bundle.out add test for 8d53ef723a6c 2007-01-15 16:13:50 -02: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 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-clone-failure.out Show the destionation for clone if not specified manually. 2006-12-09 14:19:52 +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 Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-clone-r switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-clone-r.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-clone.out Show the destionation for clone if not specified manually. 2006-12-09 14:19:52 +01:00
test-command-template Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-command-template.out Extended templating test for new branches and extra changeset info. 2006-10-18 18:10:21 +02:00
test-commit make hg commit <dirname> work again 2006-11-21 20:00:15 -02:00
test-commit-copy switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-commit-copy.out Revert almost all of 0ab603017f82; add a test 2006-11-18 19:44:42 -02:00
test-commit.out Update tests 2006-12-06 13:13:44 -06:00
test-committer Abort on empty username so specifying a username can be forced. 2007-01-24 23:04:51 +01:00
test-committer.out Abort on empty username so specifying a username can be forced. 2007-01-24 23:04:51 +01:00
test-config-case Use a case-sensitive version of SafeConfigParser everywhere 2006-10-16 15:38:53 -03:00
test-config-case.out Use a case-sensitive version of SafeConfigParser everywhere 2006-10-16 15:38:53 -03:00
test-conflict deprecate 'update -m'. use 'merge' instead. 2006-05-14 21:07:34 -07:00
test-conflict.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-confused-revert revert: require --all to revert all files. 2006-08-21 09:44:52 -07:00
test-confused-revert.out cat: default to working dir parent instead of tip 2006-09-14 19:24:00 -07:00
test-copy switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-copy2 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-copy2.out refactor debugrenamed 2006-11-15 15:51:58 -06:00
test-copy.out switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-debugcomplete fix bash completion of debug commands; add test for debugcomplete 2006-10-08 20:27:23 -03:00
test-debugcomplete.out Add debuginstall command to do basic install tests 2006-12-10 00:05:47 -06:00
test-default-push add test for default-push. 2006-06-23 18:23:42 -07:00
test-default-push.out add test for default-push. 2006-06-23 18:23:42 -07:00
test-diff-binary-file add test for diffing identical binary files 2007-02-17 09:54:58 -02:00
test-diff-binary-file.out git binary patches: don't print the header for identical files 2007-02-17 09:55:00 -02:00
test-diff-hashes use short hashes with diff -v 2006-10-13 15:34:35 -03:00
test-diff-hashes.out use short hashes with diff -v 2006-10-13 15:34:35 -03:00
test-diff-ignore-whitespace Add -D/--nodates options to hg diff/export that removes dates from diff headers 2006-09-26 00:05:24 +01:00
test-diff-ignore-whitespace.out add missed tests for diff -b/-B 2006-07-11 15:51:16 -07:00
test-diff-newlines fix diffs containing embedded "\r". 2006-05-10 10:31:54 -07:00
test-diff-newlines.out fix diffs containing embedded "\r". 2006-05-10 10:31:54 -07:00
test-diff-subdir Add -D/--nodates options to hg diff/export that removes dates from diff headers 2006-09-26 00:05:24 +01:00
test-diff-subdir.out tests: new test for hg diff of a subdirectory only 2006-08-13 23:00:18 +03:00
test-diffdir Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
test-diffdir.out Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
test-doctest.py Unified #! paths for python scripts and removed them for test modules. 2007-03-01 22:15:17 +01:00
test-empty Add empty repo test 2005-09-23 17:52:15 -07:00
test-empty-dir Don't use test -e in tests - sh doesn't like it on Solaris 2006-10-18 18:47:50 -03:00
test-empty-dir.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-empty-file make manifest friendlier 2006-11-30 22:38:48 -06:00
test-empty-file.out Test that we notice the empty files from the second parent during a merge 2006-10-25 02:51:27 -03:00
test-empty-group switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-empty-group.out document and fix findincoming 2006-05-23 10:44:40 +02:00
test-empty.out Show repo's revlog format on verify only if it doesn't match the default format. 2006-04-28 21:52:08 +02:00
test-encode switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-encode.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-encoding Use UTF-8 in .hg/branch 2006-12-10 20:35:28 -02:00
test-encoding.out "default" is the default branch name 2007-03-13 15:02:33 -03:00
test-excessive-merge switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-excessive-merge.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-export Make sequence number on hg export start at 1 (as documented for %n). Add test. 2006-12-15 19:09:10 +01:00
test-export.out Don't use node length for calculating revision number length. 2006-12-15 19:30:20 +01:00
test-extdiff Don't require a diff which accepts the -N option. 2006-12-01 22:29:47 +01:00
test-extdiff.out Don't require a diff which accepts the -N option. 2006-12-01 22:29:47 +01:00
test-extension Try to pass repo.ui to reposetup hooks 2007-02-08 16:31:21 -02:00
test-extension.out Try to pass repo.ui to reposetup hooks 2007-02-08 16:31:21 -02:00
test-fetch Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-fetch.out test-fetch: make output stable 2006-08-08 16:23:02 -07:00
test-filebranch switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-filebranch.out merge: shortcircuit filemerge for identical files 2006-10-10 01:16:06 -05:00
test-flags switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-flags.out merge with upstream 2006-10-10 09:30:05 +02:00
test-git-export git patches: handle renames of binary files 2007-02-16 04:54:46 -02:00
test-git-export.out git patches: handle renames of binary files 2007-02-16 04:54:46 -02:00
test-git-import make manifest friendlier 2006-11-30 22:38:48 -06:00
test-git-import.out handle files with more than one git binary patch 2006-11-27 22:03:36 -02:00
test-globalopts Fix some tests for portability. 2006-08-09 12:05:40 -07:00
test-globalopts.out "default" is the default branch name 2007-03-13 15:02:33 -03:00
test-grep grep: add --follow support. 2006-08-12 15:01:46 -07:00
test-grep.out Fixups for hg grep 2006-10-26 14:04:58 -05:00
test-help Further help improvements: 2005-08-06 15:43:12 +01:00
test-help.out Fix help text for hg status -i 2007-03-06 12:52:07 +01:00
test-hgignore Fix broken hgignore tests due to full path showing up in output. 2006-03-26 22:54:05 +02: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 hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks 2006-07-25 13:50:32 -07:00
test-hook.out merge: use repo.parents and parent contexts in update 2006-09-29 16:39:38 -05:00
test-http web/server: disable address reuse option for BaseHTTPServer on windows 2007-02-19 10:08:59 +01:00
test-http-clone-r switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-http-clone-r.out Testing the new changegroupsubset remote function in the ssh 2006-10-18 02:14:26 -05:00
test-http-proxy Allow for MB/sec transfer rates in test-http-proxy and test-ssh. 2006-08-21 10:46:58 -07:00
test-http-proxy.out Allow for MB/sec transfer rates in test-http-proxy and test-ssh. 2006-08-21 10:46:58 -07:00
test-http.out web/server: disable address reuse option for BaseHTTPServer on windows 2007-02-19 10:08:59 +01:00
test-hup Fix test-hup for different output of ls on at least MacOS X and Solaris 8. 2006-12-16 23:24:30 +01:00
test-hup.out Fix test-hup for different output of ls on at least MacOS X and Solaris 8. 2006-12-16 23:24:30 +01:00
test-import Fix handling of paths when run outside the repo. 2007-03-16 00:22:58 -03:00
test-import.out Fix handling of paths when run outside the repo. 2007-03-16 00:22:58 -03:00
test-incoming-outgoing Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-incoming-outgoing.out add -r/--rev arguments to incoming and outgoing 2006-06-30 16:16:35 +02:00
test-init don't create the .hg/data at init time 2006-11-27 22:22:44 +01:00
test-init.out sshrepo: don't try to validate when creating the repo 2006-09-13 19:57:40 +02:00
test-install Make debuginstall actually attempt to use external patch and merge 2006-12-10 00:44:52 -06:00
test-install.out Add some remedies and a username check to debuginstall 2006-12-10 01:05:00 -06:00
test-issue322 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-issue322.out fix issue 322. 2006-08-18 21:03:29 -07:00
test-issue352 issue352: disallow '\n' and '\r' in filenames (dirstate and manifest) 2006-11-01 17:56:55 +01:00
test-issue352.out issue352: disallow '\n' and '\r' in filenames (dirstate and manifest) 2006-11-01 17:56:55 +01:00
test-issue433 add test for issue433 2006-11-28 11:28:45 +01:00
test-issue433.out add test for issue433 2006-11-28 11:28:45 +01:00
test-issue436 additional fixes for issue436 2006-12-01 16:18:16 -02:00
test-locate Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-locate.out Test case for #294 2006-06-23 08:10:06 +02:00
test-lock-badness switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-lock-badness.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-log Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
test-log.out Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
test-manifest-merging Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-manifest-merging.out make manifest-merging test reproduceable 2006-10-11 15:52:08 -05:00
test-merge1 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-merge1.out Clarify untracked file merge message 2006-11-01 21:47:55 -06:00
test-merge2 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-merge2.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02: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 deprecate 'update -m'. use 'merge' instead. 2006-05-14 21:07:34 -07:00
test-merge4.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-merge5 Backed out changeset 0fc94973be4ffeb0b5ace8a920dec676a9a51130 2006-10-31 13:02:49 +01:00
test-merge5.out Backed out changeset 0fc94973be4ffeb0b5ace8a920dec676a9a51130 2006-10-31 13:02:49 +01:00
test-merge6 make manifest friendlier 2006-11-30 22:38:48 -06:00
test-merge6.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-merge7 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-merge7.out merge: various tidying 2006-10-10 02:15:20 -05:00
test-merge8 Test for 1de7d8df2123 (update dirstate correctly for non-branchmerge updates) 2006-10-14 10:53:29 +02:00
test-merge8.out avoid unnecessary copy merges 2006-11-18 11:34:19 -06:00
test-merge-commit filecommit: don't forget the local parent on a merge with a local rename 2007-01-30 19:09:08 -02:00
test-merge-commit.out filecommit: don't forget the local parent on a merge with a local rename 2007-01-30 19:09:08 -02:00
test-merge-default merge with other head by default, not tip. 2006-08-15 11:38:07 -07:00
test-merge-default.out merge with other head by default, not tip. 2006-08-15 11:38:07 -07:00
test-merge-local Add instructions how to redo/finish failed merge with local working directory. 2006-12-11 18:09:52 +01:00
test-merge-local.out Add instructions how to redo/finish failed merge with local working directory. 2006-12-11 18:09:52 +01:00
test-merge-revert Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-merge-revert2 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-merge-revert2.out Add instructions how to redo/finish failed merge with local working directory. 2006-12-11 18:09:52 +01:00
test-merge-revert.out merge: if filemerge skips merge, report as updated 2006-10-15 16:18:09 -05:00
test-mq fix qrefresh'ing an empty patch 2007-03-10 22:03:23 -03:00
test-mq-caches Move branches.cache to branch.cache 2007-03-13 15:18:10 -05:00
test-mq-caches.out Move branches.cache to branch.cache 2007-03-13 15:18:10 -05:00
test-mq-guards mq: abort cleanly when invalid patch name is given to qguard 2007-03-03 17:54:13 +01:00
test-mq-guards.out mq: abort cleanly when invalid patch name is given to qguard 2007-03-03 17:54:13 +01:00
test-mq-qdelete Update test-mq-qdelete to use qdel -r 2006-10-12 14:19:34 -07:00
test-mq-qdelete.out Update test-mq-qdelete to use qdel -r 2006-10-12 14:19:34 -07:00
test-mq-qdiff Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-mq-qdiff.out tests: new test for mq qdiff command 2006-08-15 20:59:55 +03:00
test-mq-qnew-twice Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-mq-qnew-twice.out Fix test-mq-qnew-twice exit code and output. 2006-07-28 09:00:30 +02:00
test-mq-qrefresh tests: add new test; test-mq-qrefresh 2006-09-20 21:44:35 +02:00
test-mq-qrefresh-replace-log-message Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-mq-qrefresh-replace-log-message.out MQ: uniformise message and logfile option. 2006-07-26 20:11:54 +02:00
test-mq-qrefresh.out tests: add new test; test-mq-qrefresh 2006-09-20 21:44:35 +02:00
test-mq-qrename Make qrename handle directory targets; closes #333. 2006-09-13 08:57:08 -07:00
test-mq-qrename.out Make qrename handle directory targets; closes #333. 2006-09-13 08:57:08 -07:00
test-mq-qsave Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc 2006-08-22 10:08:42 +02:00
test-mq-qsave.out Add basic qsave/qrestore test. 2006-08-07 14:48:24 -07:00
test-mq.out fix qrefresh'ing an empty patch 2007-03-10 22:03:23 -03:00
test-nested-repo revert: require --all to revert all files. 2006-08-21 09:44:52 -07:00
test-nested-repo.out Fixed test output for not using the deprecated 'hg forget'. 2006-04-27 13:05:02 +02:00
test-newbranch Move branch read/write to dirstate where it belongs 2007-03-13 18:50:02 -05:00
test-newbranch.out Move branches.cache to branch.cache 2007-03-13 15:18:10 -05: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-notify Fix sed expression in test-notify to be more portable. 2007-03-07 15:06:32 +01:00
test-notify.out notify: don't try to fix addresses if notify.domain is not set 2007-02-16 04:54:49 -02:00
test-oldcgi Don't change $PATH (breaks python in other locations) and $PWD in test-oldcgi 2006-06-30 21:40:56 +02:00
test-oldcgi.out Fix new tests to be better. In particular, fix webraw test to 2006-06-30 08:45:52 -07:00
test-parse-date util.strdate: assume local time when no timezone specified 2006-10-03 12:33:18 +02:00
test-parse-date.out parsedate: use Abort rather than ValueError 2006-12-06 13:13:26 -06:00
test-parseindex switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-parseindex.out add test for revlog.parseindex 2006-05-14 18:37:50 -03:00
test-permissions switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-permissions.out Show repo's revlog format on verify only if it doesn't match the default format. 2006-04-28 21:52:08 +02:00
test-pull make manifest friendlier 2006-11-30 22:38:48 -06:00
test-pull-permission switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-pull-permission.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02: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-corruption2 Wait for first pull to be completed before doing verify. 2006-06-28 12:29:48 +02:00
test-pull-pull-corruption2.out Show repo's revlog format on verify only if it doesn't match the default format. 2006-04-28 21:52:08 +02:00
test-pull-pull-corruption.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-pull.out addremove: do not deprecate. 2006-07-23 09:04:14 -07: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 Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-push-http hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks 2006-07-25 13:50:32 -07:00
test-push-http.out hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks 2006-07-25 13:50:32 -07:00
test-push-r switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-push-r.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-push-warn fix calculation of new heads added during push with -r 2006-12-17 05:00:22 +01:00
test-push-warn.out fix calculation of new heads added during push with -r 2006-12-17 05:00:22 +01:00
test-rawcommit1 make manifest friendlier 2006-11-30 22:38:48 -06:00
test-rawcommit1.out Don't show empty list of files in hg log -v. 2006-10-18 12:26:12 +02:00
test-remove Add -D/--nodates options to hg diff/export that removes dates from diff headers 2006-09-26 00:05:24 +01:00
test-remove.out Refactor log ui buffering and patch display 2006-11-13 13:26:57 -06:00
test-rename Enable path validation for copy, rename, debugwalk and other canonpath users. 2006-03-19 14:53:58 +01:00
test-rename-dir-merge Fix test-rename-dir-merge for different implementations of ls. 2006-12-01 15:40:23 +01:00
test-rename-dir-merge2 merge: fix renaming of subdirectories under renamed directories 2007-02-27 16:20:06 -06:00
test-rename-dir-merge2.out merge: fix renaming of subdirectories under renamed directories 2007-02-27 16:20:06 -06:00
test-rename-dir-merge.out Fix test-rename-dir-merge for different implementations of ls. 2006-12-01 15:40:23 +01:00
test-rename-merge1 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-rename-merge1.out merge: report destinations of moves in merge action messages 2006-11-30 17:36:33 -06:00
test-rename-merge2 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-rename-merge2.out merge: only store one direction of copies in the copy map 2006-11-30 17:36:33 -06:00
test-rename.out Make hg update more verbose by default (issue12) 2006-05-02 18:44:02 +02:00
test-requires add "requires" file to the repo, specifying the requirements 2006-12-10 00:06:59 +01:00
test-requires.out add "requires" file to the repo, specifying the requirements 2006-12-10 00:06:59 +01:00
test-revert Fix confusing message from hg revert (issue332) 2007-03-16 00:22:52 -03:00
test-revert-unknown revert: require --all to revert all files. 2006-08-21 09:44:52 -07:00
test-revert-unknown.out small changes to revert command. 2006-04-03 10:02:09 -07:00
test-revert.out Fix confusing message from hg revert (issue332) 2007-03-16 00:22:52 -03:00
test-ro-message deprecate 'update -m'. use 'merge' instead. 2006-05-14 21:07:34 -07:00
test-ro-message.out Fixed OSError "No such file or directory: None" and make IOError consistent. 2006-09-11 10:23:23 +02:00
test-rollback deprecate undo command, replace with rollback command. 2006-05-08 14:19:05 -07:00
test-rollback.out deprecate undo command, replace with rollback command. 2006-05-08 14:19:05 -07:00
test-simple-update make manifest friendlier 2006-11-30 22:38:48 -06:00
test-simple-update.out addremove: do not deprecate. 2006-07-23 09:04:14 -07:00
test-ssh switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-ssh-clone-r switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-ssh-clone-r.out Testing the new changegroupsubset remote function in the ssh 2006-10-18 02:14:26 -05:00
test-ssh.out switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
test-static-http Don't use test -e in tests - sh doesn't like it on Solaris 2006-10-18 18:47:50 -03:00
test-static-http.out hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks 2006-07-25 13:50:32 -07:00
test-status Removed unknown option -t in test-status 2006-12-08 23:33:32 +01:00
test-status.out Removed unknown option -t in test-status 2006-12-08 23:33:32 +01:00
test-strict Make test-strict append to $HGRCPATH, like other tests do since e6e7d87cb388. 2006-08-22 10:20:21 +02:00
test-strict.out various doc fixes 2006-12-29 06:37:43 +01:00
test-symlink-root Fix accessing the repo through a symlink. 2007-02-15 05:18:23 -02:00
test-symlink-root.out Fix accessing the repo through a symlink. 2007-02-15 05:18:23 -02:00
test-symlinks Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
test-symlinks.out addremove: do not deprecate. 2006-07-23 09:04:14 -07:00
test-tag change 'hg tag' to tag the parent rev instead of tip 2006-07-21 01:40:07 +02:00
test-tag.out tag: shorten hash in default commit message 2006-08-20 23:52:52 -05:00
test-tags tags: add --remove 2007-03-14 19:13:04 -05:00
test-tags.out tags: add --remove 2007-03-14 19:13:04 -05:00
test-transplant transplant: log source node when recovering too. 2006-12-01 15:00:33 -08:00
test-transplant.out transplant: log source node when recovering too. 2006-12-01 15:00:33 -08:00
test-trusted.py Unified #! paths for python scripts and removed them for test modules. 2007-03-01 22:15:17 +01:00
test-trusted.py.out save settings from untrusted config files in a separate configparser 2006-10-26 19:25:45 +02:00
test-ui-config move the parsing of --config options to commands.py 2006-10-10 18:43:20 -03:00
test-ui-config.out Include section name and parameter name (if available) in config errors. 2006-09-08 10:01:45 +02:00
test-ui-verbosity ui.py: untangle updateopts 2006-10-10 18:43:20 -03:00
test-ui-verbosity.out update ui.quiet/verbose/debug/interactive every time the config changes 2006-10-10 18:43:20 -03:00
test-unrelated-pull update test for unrelated repo. 2006-03-14 23:00:45 -08:00
test-unrelated-pull.out Fix up parent display in logging 2006-11-07 14:04:15 -06:00
test-up-local-change Add -D/--nodates options to hg diff/export that removes dates from diff headers 2006-09-26 00:05:24 +01:00
test-up-local-change.out Backed out changeset 0fc94973be4ffeb0b5ace8a920dec676a9a51130 2006-10-31 13:02:49 +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 merge: various tidying 2006-10-10 02:15:20 -05:00
test-walk Fix handling of paths when run outside the repo. 2007-03-16 00:22:58 -03:00
test-walk.out Fix handling of paths when run outside the repo. 2007-03-16 00:22:58 -03:00
test-webraw tests: add timeouts, make run-tests.py clean up dead daemon processes 2006-07-06 11:45:34 -07:00
test-webraw.out test-webraw: do not store hostname in test output 2006-06-30 22:04:02 -07:00
tinyproxy.py http: fix many problems with url parsing and auth. added proxy test. 2006-05-22 15:42:49 -07:00

A simple testing framework

To run the tests, do:

cd tests/
python run-tests.py

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 merge want user interaction

  for commit use -m "text"
  for hg merge, 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 and export may show the current time

  use -D/--nodates to strip the dates

- You can append your own hgrc settings to the file that the environment
  variable HGRCPATH points to. This file is cleared before running a test.

You also need to be careful that the tests are portable from one platform
to another.  You're probably working on Linux, where the GNU toolchain has
more (or different) functionality than on MacOS, *BSD, Solaris, AIX, etc.
While testing on all platforms is the only sure-fire way to make sure that
you've written portable code, here's a list of problems that have been
found and fixed in the tests.  Another, more comprehensive list may be
found in the GNU Autoconf manual, online here:

    http://www.gnu.org/software/autoconf/manual/html_node/Portable-Shell.html

sh:

The Bourne shell is a very basic shell.  /bin/sh on Linux is typically
bash, which even in Bourne-shell mode has many features that Bourne shells
on other Unix systems don't have (and even on Linux /bin/sh isn't
guaranteed to be bash).  You'll need to be careful about constructs that
seem ubiquitous, but are actually not available in the least common
denominator.  While using another shell (ksh, bash explicitly, posix shell,
etc.) explicitly may seem like another option, these may not exist in a
portable location, and so are generally probably not a good idea.  You may
find that rewriting the test in python will be easier.

- don't use pushd/popd; save the output of "pwd" and use "cd" in place of
  the pushd, and cd back to the saved pwd instead of popd.

- don't use math expressions like let, (( ... )), or $(( ... )); use "expr"
  instead.

grep:

- don't use the -q option; redirect stdout to /dev/null instead.

- don't use extended regular expressions with grep; use egrep instead, and
  don't escape any regex operators.

sed:

- make sure that the beginning-of-line matcher ("^") is at the very
  beginning of the expression -- it may not be supported inside parens.

echo:

- echo may interpret "\n" and print a newline; use printf instead if you
  want a literal "\n" (backslash + n).

false:

- false is guaranteed only to return a non-zero value; you cannot depend on
  it being 1.  On Solaris in particular, /bin/false returns 255.  Rewrite
  your test to not depend on a particular return value, or create a
  temporary "false" executable, and call that instead.

diff:

- don't use the -N option.  There's no particularly good workaround short
  of writing a reasonably complicated replacement script, but substituting
  gdiff for diff if you can't rewrite the test not to need -N will probably
  do.