diff tests/test-fileset.t @ 38829:7e7e2b2ff284

fileset: add stub for weight-based optimization The main purpose of this change is to group basic patterns, which can be mapped to a plain matcher. I'm not so interested in a weight of each function.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 21 Jul 2018 15:52:26 +0900
parents 48fc2a8af345
children b975c5801487
line wrap: on
line diff
--- a/tests/test-fileset.t	Sat Jul 21 16:16:44 2018 +0900
+++ b/tests/test-fileset.t	Sat Jul 21 15:52:26 2018 +0900
@@ -180,6 +180,17 @@
       (func
         (symbol 'clean')
         None)))
+  * optimized:
+  (or
+    (symbol 'a1')
+    (symbol 'a2')
+    (and
+      (func
+        (symbol 'grep')
+        (string 'b'))
+      (func
+        (symbol 'clean')
+        None)))
   * matcher:
   <unionmatcher matchers=[
     <patternmatcher patterns='(?:a1$)'>,