diff options
author | Eduardo Julian | 2015-12-31 20:25:24 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-12-31 20:25:24 -0400 |
commit | f0099384d94a6a424e798f9019e3fad691406e83 (patch) | |
tree | 91aaf15afa42be6689ae9a361e4215eb4cb6e1b9 /test/test/lux/lexer.clj | |
parent | 8aebde76ee407b96db956e5d8bdea8e67dc6c6ad (diff) |
- Implemented multi-line text literals.
Diffstat (limited to '')
-rw-r--r-- | test/test/lux/lexer.clj | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/test/test/lux/lexer.clj b/test/test/lux/lexer.clj index 72602639d..dc00c1d51 100644 --- a/test/test/lux/lexer.clj +++ b/test/test/lux/lexer.clj @@ -160,19 +160,26 @@ (deftest lex-text (let [input1 "" input2 "abc" - input3 "yolo\\nlol\\tmeme"] + input3 "yolo\\nlol\\tmeme" + input4 "This is a test \\ + \\ of multi-line text. \\ + + \\ I just wanna make sure it works alright..."] (|case (&/run-state (|do [[_ output1] &lexer/lex [_ output2] &lexer/lex - [_ output3] &lexer/lex] - (return (&/T output1 output2 output3))) + [_ output3] &lexer/lex + [_ output4] &lexer/lex] + (return (&/T output1 output2 output3 output4))) (make-state (str "\"" input1 "\"" "\n" "\"" input2 "\"" "\n" "\"" input3 "\""))) (&/$Right state [(&lexer/$Text output1) (&lexer/$Text output2) - (&lexer/$Text output3)]) + (&lexer/$Text output3) + (&lexer/$Text output4)]) (are [input output] (= input output) input1 output1 input2 output2 - "yolo\nlol\tmeme" output3) + "yolo\nlol\tmeme" output3 + "This is a test\nof multi-line text.\n\nI just wanna make sure it works alright..." output4) _ (is false "Couldn't read.") |