                            [a c C Z])
             two-data))))
 
- ;; FIXME: map-matcher-or-test - #3 --- same test?
-(t/deftest map-matcher-regex-key-not-found-test
-  (t/is (= false
-           (example-matcher three-data))))
-
 (p/defpattern one-or
   [(:kind #"one")
    (:x (:or "a" "b" "c" "x") :as x)

  (t/testing "with compare-fn"
    (let [evt {"X" "x"}]
      (t/is (= "x"
               ;; FIXME: please explain: #(= % )
               ((p/map-matcher [(X (:compare-fn #(= % (get evt "X"))))] x)
                evt)))))
  (t/testing "as local constant"

    (t/is (= {:x "b"} (p/clause->lhs {} (p/key-matches-without-binding-clause :x (p/match-const "b"))))))

  (t/testing "path matches with binding"
    (t/is (= {:x {:y {:z "b"}}}
             (p/clause->lhs {} (p/path-matches-with-binding-clause [:x :y :z] (p/match-const "b") "z"))))
    (t/is (= {:x {:y {:z "b"}}}
             (p/clause->lhs {} (p/path-matches-with-binding-clause [:x :y :z] (p/match-const "b") "rebind"))))
    ;; FIXME: what is wrong with that test?
    #_(t/is (= `({:x {:y {"Z" ~(quote _)}}} :guard [(constantly (~even? (get-in {} [:x :y "Z"])))])
             (p/clause->lhs {} (p/path-matches-with-binding-clause [:x :y "Z"] (p/match-predicate even?))))))

  (t/testing "path matches without binding"
    (t/is (= {:x {:y {:z "b"}}}
             (p/clause->lhs {} (p/path-matches-without-binding-clause [:x :y :z] (p/match-const "b")))))))

(t/deftest path-matches-with-binding-clause->rhs-match-test
  (t/is (= `[~(symbol "z") (get-in {:x {:y {:z "b"}}} [:x :y :z] "b")]
