Mercurial > hg
comparison tests/test-hgignore.t @ 12376:97ffc68f71d3
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.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Wed, 22 Sep 2010 16:06:02 -0500 |
parents | 02990e22150b |
children | 4fee1fd3de9a |
comparison
equal
deleted
inserted
replaced
12375:02990e22150b | 12376:97ffc68f71d3 |
---|---|
42 ? dir/c.o | 42 ? dir/c.o |
43 ? syntax | 43 ? syntax |
44 | 44 |
45 $ echo "*.o" > .hgignore | 45 $ echo "*.o" > .hgignore |
46 $ hg status | 46 $ hg status |
47 abort: .*/\.hgignore: invalid pattern \(relre\): \*\.o (re) | 47 abort: */.hgignore: invalid pattern (relre): \*.o (glob) |
48 [255] | 48 [255] |
49 | 49 |
50 $ echo ".*\.o" > .hgignore | 50 $ echo ".*\.o" > .hgignore |
51 $ hg status | 51 $ hg status |
52 A dir/b.o | 52 A dir/b.o |
86 ? a.c | 86 ? a.c |
87 ? syntax | 87 ? syntax |
88 | 88 |
89 $ echo "syntax: invalid" > .hgignore | 89 $ echo "syntax: invalid" > .hgignore |
90 $ hg status | 90 $ hg status |
91 .*/\.hgignore: ignoring invalid syntax 'invalid' (re) | 91 */.hgignore: ignoring invalid syntax 'invalid' (glob) |
92 A dir/b.o | 92 A dir/b.o |
93 ? .hgignore | 93 ? .hgignore |
94 ? a.c | 94 ? a.c |
95 ? a.o | 95 ? a.o |
96 ? dir/c.o | 96 ? dir/c.o |