# HG changeset patch # User Martin von Zweigbergk # Date 1415215557 28800 # Node ID 70e822796ac803d4cecabf2b73526ae909a2b811 # Parent dc562165044aaec642d9ead37299840555e2d48c 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. diff -r dc562165044a -r 70e822796ac8 tests/test-walk.t --- a/tests/test-walk.t Sat May 16 16:06:22 2015 -0700 +++ b/tests/test-walk.t Wed Nov 05 11:25:57 2014 -0800 @@ -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