Commit Graph

18 Commits

Author SHA1 Message Date
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
Matt Mackall
8971e5af3c check-code: fix issues with finding patterns in unified tests, fix tests
- old-style patterns without ^ were getting improperly anchored
- finditer was matching against beginning of line poorly
- \s was matching newlines
- [^x] was matching newlines

so we:

- remove earlier hacks for multiline matching
- fix unified test anchoring by adding .*
- replace \s with [ \t]
- replace [^x] with [^\nx]
- force all matches into multiline mode so ^ anchors work

This uncovers a number of test issues that are then repaired.
2011-10-27 17:22:04 -05:00
Idan Kamara
19f1b36e00 dispatch: make sure global options on the command line take precedence
So if a user has verbose=True somewhere in his .hgrc files, giving -q
on the command line will override that.

This basically reverts cd10f447ccba.
2011-07-30 21:04:14 +03:00
Idan Kamara
ff97debbbd dispatch: make sure unspecified global ui options don't override old values 2011-06-24 12:16:14 +03:00
Matt Mackall
479dfb8747 tests: glob version number in test-hgrc 2011-05-31 17:18:23 -05:00
Matt Mackall
20e41fa990 tests: update for handling of missing hgrc includes 2011-05-31 16:24:47 -05:00
Yann E. MORIN
013aed8037 ui: test plain mode against exceptions
Let ui.plain() accept an optional parameter in the form of a feature
name (as a string) to exclude from plain mode.

The result of ui.plain is now:
 - False if HGPLAIN is not set or the requested feature is in HGPLAINEXCEPT
 - True otherwise

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-05-17 00:08:51 +02:00
Brodie Rao
5f24d65643 HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
This makes it possible to gain the benefits of HGPLAIN for scripting
while preserving different behaviors like internationalization.
2011-01-05 00:18:36 +11:00
Martin Geisler
6bba178e16 tests: use $TESTTMP more and use (glob) less
This locks down the test output a little more.
2011-03-10 13:43:47 +01:00
Brodie Rao
78b26c82ec showconfig: don't accept multiple sections and one config item
Showconfig now behaves as documented and only accepts one section.name argument
or a number of section names.
2010-10-09 16:55:33 -05:00
Mads Kiilerich
3174ff376b tests: remove redundant globs
Many globs now just match $TESTTMP and is no longer needed.
2010-10-08 22:36:10 -05: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
Brodie Rao
b5fe0d906e tests: add glob matching for unified tests
This adds a " (glob)" marker that works like a simpler version of
(re): "*" is converted to ".*", and "?" is converted to ".".

Both special characters can be escaped using "\", and the backslash
itself can be escaped as well.

Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't
supported.
2010-09-22 16:06:02 -05:00
Brodie Rao
7d7d96bd74 tests: require regexes in unified tests to be marked with " (re)"
Consider this test:

  $ hg glog --template '{rev}:{node|short} "{desc}"\n'
  @  2:20c4f79fd7ac "3"
  |
  | o  1:38f24201dcab "2"
  |/
  o  0:2a18120dc1c9 "1"

Because each line beginning with "|" can be compiled as a regular
expression (equivalent to ".*|"), they will match any output.

Similarly:

  $ echo foo


The blank output line can be compiled as a regular expression and will
also match any output.

With this patch, none of the above output lines will be matched as
regular expressions. A line must end in " (re)" in order to be matched
as one.

Lines are still matched literally first, so the following will pass:

  $ echo 'foo (re)'
  foo (re)
2010-09-22 16:06:00 -05:00
Brodie Rao
3ed54dfa3d tests: improve regexes in unified tests 2010-09-22 16:05:58 -05:00
Matt Mackall
5d9fc42983 tests: drop a bunch of sed calls from unified tests 2010-09-21 16:44:13 -05:00
Nicolas Dumazet
4842cb2bc0 tests: remove useless sed in test-hgrc 2010-08-30 13:43:34 +09:00
Brodie Rao
bf4b0442af tests: unify test-hgrc 2010-08-21 23:24:52 -04:00