Commit Graph

19 Commits

Author SHA1 Message Date
Bryan O'Sullivan
158df87946 tests: reduce spurious failures when run with generaldelta
Quite a few tests fail in noisy but meaningless ways when the test suite
is run with generaldelta enabled:

  ./run-tests.py --extra-config-opt=format.generaldelta=1

This reduces the amount of noise introduced by the debugindex command,
the main source of differences.  In my environment, when testing with
generaldelta enabled, this change reduces the number of completely
failing tests from 21 to 8.
2012-07-11 15:03:10 -07:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Adrian Buehlmann
a98fa3a65d test-commit: remove extra cd ..
This specific cd .. leaves the base directory of the test ($TESTTMP).

Removing it avoids that test artifacts (e.g. files) are created
outside of the base directory.
2012-06-09 14:20:25 +02:00
Adrian Buehlmann
6949570f9b tests: roll test-commit-copy.t into test-commit.t 2012-06-04 18:40:31 +02:00
Mads Kiilerich
7d411da706 tests: introduce c-style conditional sections in .t tests
This makes it possible to have conditional sections like:

#if windows
  $ echo foo
  foo
#else
  $ echo bar
  bar
#endif

The directives and skipped sections are treated like comments, so don't
interleave them with commands and their output.

The parameters to #if are evaluated while preparing the test by passing them
over to hghave. Requirements can thus be negated with 'no-' prefix, and
multiple requirements must all be true to return true.
2012-06-01 02:25:12 +02:00
Mads Kiilerich
637e2ecde2 tests: hide 'No such file or directory' messages
Windows will use a different and localized message.
2011-11-16 03:45:14 +01:00
Mads Kiilerich
8c22a0ec28 tests: make (glob) on windows accept \ instead of /
Globbing is usually used for filenames, so on windows it is reasonable and very
convenient that glob patterns accepts '\' or '/' when the pattern specifies
'/'.
2011-11-07 03:25:10 +01:00
Mads Kiilerich
4838bfb2c4 tests: use 'hghave symlink' for tests using symlinks 2011-11-07 03:14:54 +01:00
Pierre-Yves David
2ebc0660c3 requirements: show all missing features in the error message.
Displaying all missing featureis help people to solve the issue (choosing the
right version, creation the right repo)
2011-06-25 02:30:24 +02:00
Adrian Buehlmann
cfc4484960 readrequires: provide easier to understand error message
NEW:

  $ hg id
  abort: unknown repository format: requires feature 'foo' (upgrade Mercurial)!

OLD:

  $ hg id
  abort: requirement 'foo' not supported!
2011-05-31 19:16:25 +02:00
Martin Geisler
43d795e497 commit: note when files are missing
Before, you could experience the following strange interaction:

  $ hg commit
  nothing changed
  $ hg merge
  abort: outstanding uncommitted changes

which confused at least one user in #mercurial.
2011-04-06 16:21:12 +02:00
Adrian Buehlmann
a8a418601f introduce new RequirementError (issue2649)
This improves the misleading error message

  $ hg identify
  abort: there is no Mercurial repository here (.hg not found)!

to the more explicit

  $ hg identify
  abort: requirement 'fake' not supported!

for all commands in commands.optionalrepo, which includes the identify
and serve commands in particular.

This is for the case when a new entry in .hg/requires will be defined
in a future Mercurial release.
2011-02-18 20:25:25 +01:00
Adrian Buehlmann
9817658bbd parsedate: abort on negative dates (issue2513)
catches "hg commit -d '-7654321 3600'" (example)
2010-11-24 19:31:43 +01:00
Martin Geisler
3d112b3042 tests: added a short description to issue numbers
Many tests already had a short line to describe what IssueXXX is
about. I find that quite useful when reading a test.
2010-09-24 10:13:49 +02:00
Matt Mackall
bf9417da11 tests: exit 0 no longer needed on unified tests 2010-09-17 17:03:04 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Martin Geisler
cc612c476f tests: remove unneeded -d flags
Many tests fixed the commit date of their changesets at '1000000 0' or
similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not
better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is
the default run-tests.py installs.

Removing the unnecessary flag removes some clutter and will hopefully
make it clearer what the tests are really trying to test. Some tests
did not even change their output when the dates were changed, in which
case the -d flag was truly irrelevant.

Dates used in sequence (such as '0 0', '1 0', etc...) were left alone
since they may make the test easier to understand.
2010-09-02 23:22:51 +02:00
Nicolas Dumazet
90787c08f9 util: get rid of extra trailing whitespace in parsedate abort message 2010-08-30 13:29:44 +09:00
Nicolas Dumazet
557c241888 tests: unify test-commit 2010-08-12 22:22:17 +09:00