tests/test-fileset.t
changeset 38831 b975c5801487
parent 38829 7e7e2b2ff284
child 38832 ca4de8ba5b5f
--- a/tests/test-fileset.t	Sun Jul 22 11:47:29 2018 +0900
+++ b/tests/test-fileset.t	Sat Jul 21 16:41:45 2018 +0900
@@ -186,18 +186,18 @@
     (symbol 'a2')
     (and
       (func
-        (symbol 'grep')
-        (string 'b'))
+        (symbol 'clean')
+        None)
       (func
-        (symbol 'clean')
-        None)))
+        (symbol 'grep')
+        (string 'b'))))
   * matcher:
   <unionmatcher matchers=[
     <patternmatcher patterns='(?:a1$)'>,
     <patternmatcher patterns='(?:a2$)'>,
     <intersectionmatcher
-      m1=<predicatenmatcher pred=grep('b')>,
-      m2=<predicatenmatcher pred=clean>>]>
+      m1=<predicatenmatcher pred=clean>,
+      m2=<predicatenmatcher pred=grep('b')>>]>
   a1
   a2
   b1
@@ -283,6 +283,19 @@
   $ fileset 'binary()'
   bin
 
+  $ fileset -p optimized -s 'binary() and b*'
+  * optimized:
+  (and
+    (symbol 'b*')
+    (func
+      (symbol 'binary')
+      None))
+  * matcher:
+  <intersectionmatcher
+    m1=<patternmatcher patterns='(?:b[^/]*$)'>,
+    m2=<predicatenmatcher pred=binary>>
+  bin
+
   $ fileset 'grep("b{1}")'
   .hgignore
   b1