tests: test filesets with test-fileset.t stable
authorPatrick Mezard <patrick@mezard.eu>
Wed, 15 Aug 2012 17:39:03 +0200
branchstable
changeset 17362 bd867a9ca510
parent 17360 935831597e16
child 17363 5d9e2031c0b1
tests: test filesets with test-fileset.t
tests/test-fileset.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-fileset.t	Wed Aug 15 17:39:03 2012 +0200
@@ -0,0 +1,39 @@
+  $ fileset() {
+  >   hg debugfileset "$@"
+  > }
+
+  $ hg init repo
+  $ cd repo
+  $ echo a > a1
+  $ echo a > a2
+  $ echo b > b1
+  $ hg ci -Am addfiles
+  adding a1
+  adding a2
+  adding b1
+
+Test operators and basic patterns
+
+  $ fileset a1
+  a1
+  $ fileset 'a*'
+  a1
+  a2
+  $ fileset '"re:a\d"'
+  a1
+  a2
+  $ fileset 'a1 or a2'
+  a1
+  a2
+  $ fileset 'a1 | a2'
+  a1
+  a2
+  $ fileset 'a* and "*1"'
+  a1
+  $ fileset 'a* & "*1"'
+  a1
+  $ fileset 'not (r"a*")'
+  b1
+  $ fileset '! ("a*")'
+  b1
+