Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/com/yetanalytics/flint/spec/expr.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@
kwargs (conj [:expr/kwargs kwargs])))

(def expr-branch-spec
(s/and list?
(s/and seq?
expr-multi-spec
(s/conformer conform-expr)))

(def agg-expr-branch-spec
(s/and list?
(s/and seq?
agg-expr-multi-spec
(s/conformer conform-expr)))

Expand Down
8 changes: 8 additions & 0 deletions src/test/com/yetanalytics/flint_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
(make-format-pretty-tests (fn [q] (format-query q :pretty? true))
"dev-resources/test-fixtures/inputs/query/"))

(deftest cons-expression-test
(let [fclause (cons '= '(?v 5))]
(is (= "PREFIX ex: <http://ex.com/> SELECT ?e WHERE { ?e ex:value ?v . FILTER (?v = 5) }"
(format-query {:prefixes {:ex "<http://ex.com/>"}
:select '[?e]
:where ['[?e :ex/value ?v]
[:filter fclause]]})))))

(deftest update-tests
(make-format-tests format-update
"dev-resources/test-fixtures/inputs/update/")
Expand Down
Loading