Fixed all failing tests. Two issues:

1. The regression test failures were both errors in the tests rather than in
the code under test;
2. The failure in the 'bulk' test relates to the fact that the new declarative
parser cannot cope with trailing whitespace.
This commit is contained in:
simon 2016-09-23 12:53:00 +01:00
parent ddf967088e
commit 88d707a32e
4 changed files with 18 additions and 16 deletions

View file

@ -41,7 +41,7 @@
lines delimited by the new-line character. Return a list of S-expressions."
[string]
;; TODO: tried to do this using with-open, but couldn't make it work.
(map parse-rule (remove comment? (split string #"\n"))))
(map #(parse-rule (trim %)) (remove comment? (split string #"\n"))))
(defn parse-file
"Parse rules from successive lines in the file loaded from this `filename`.