mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
test-walk: add more tests for -I/-X
We had very limited testing of -I and -X, especially when combined with plain file patterns and with each other. This adds some more protection against regressions as upcoming patches modify the matcher code. (Originally meant for my own upcoming patches, but now I know drgott will be sending some patches soon.) The only noteworthy cases seems to be that both of hg debugwalk -Xbeans/black beans/black hg debugwalk -Xbeans beans/black walk the file. I would personally have expected the -X to trump. I don't care enough to change it, but I also think it's fair if some future commit changes the behavior.
This commit is contained in:
parent
8e42385986
commit
4d48c0092d
@ -170,6 +170,32 @@
|
||||
f beans/black beans/black
|
||||
f fenugreek fenugreek
|
||||
f mammals/skunk mammals/skunk
|
||||
$ hg debugwalk -Ibeans mammals
|
||||
$ hg debugwalk -Inon-existent
|
||||
$ hg debugwalk -Inon-existent -Ibeans/black
|
||||
f beans/black beans/black
|
||||
$ hg debugwalk -Ibeans beans/black
|
||||
f beans/black beans/black exact
|
||||
$ hg debugwalk -Ibeans/black beans
|
||||
f beans/black beans/black
|
||||
$ hg debugwalk -Xbeans/black beans
|
||||
f beans/borlotti beans/borlotti
|
||||
f beans/kidney beans/kidney
|
||||
f beans/navy beans/navy
|
||||
f beans/pinto beans/pinto
|
||||
f beans/turtle beans/turtle
|
||||
$ hg debugwalk -Xbeans/black -Ibeans
|
||||
f beans/borlotti beans/borlotti
|
||||
f beans/kidney beans/kidney
|
||||
f beans/navy beans/navy
|
||||
f beans/pinto beans/pinto
|
||||
f beans/turtle beans/turtle
|
||||
$ hg debugwalk -Xbeans/black beans/black
|
||||
f beans/black beans/black exact
|
||||
$ hg debugwalk -Xbeans/black -Ibeans/black
|
||||
$ hg debugwalk -Xbeans beans/black
|
||||
f beans/black beans/black exact
|
||||
$ hg debugwalk -Xbeans -Ibeans/black
|
||||
$ hg debugwalk 'glob:mammals/../beans/b*'
|
||||
f beans/black beans/black
|
||||
f beans/borlotti beans/borlotti
|
||||
|
Loading…
Reference in New Issue
Block a user