datalog: parser rejection tests for invalid relation names (233/233)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 56s

This commit is contained in:
2026-05-08 14:16:31 +00:00
parent 0985dc6386
commit 21c541bd1b
3 changed files with 16 additions and 6 deletions

View File

@@ -126,6 +126,16 @@
"underscore var"
(dl-parse "p(X) :- q(X, _).")
(list {:body (list (list (quote q) (quote X) (quote _))) :head (list (quote p) (quote X))}))
(dl-pt-test!
"number as relation name raises"
(dl-pt-throws? (fn () (dl-parse "1(X) :- p(X).")))
true)
(dl-pt-test!
"var as relation name raises"
(dl-pt-throws? (fn () (dl-parse "P(X).")))
true)
(dl-pt-test!
"missing dot raises"
(dl-pt-throws? (fn () (dl-parse "p(a)")))