diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/parser.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/new-luxc/test/test/luxc/parser.lux b/new-luxc/test/test/luxc/parser.lux index 576a48ea3..0f2fd2dd1 100644 --- a/new-luxc/test/test/luxc/parser.lux +++ b/new-luxc/test/test/luxc/parser.lux @@ -79,7 +79,7 @@ (do @ [sample code^] (test "Can parse Lux code." - (case (&;parse [default-cursor (code;to-text sample)]) + (case (&;parse [default-cursor +0 (code;to-text sample)]) (#e;Error error) false @@ -99,7 +99,7 @@ signed? r;bool #let [expected (|> numerator (f./ denominator) (f.* (if signed? -1.0 1.0)))]] (test "Can parse frac ratio syntax." - (case (&;parse [default-cursor + (case (&;parse [default-cursor +0 (format (if signed? "-" "") (%i (frac-to-int numerator)) "/" @@ -117,7 +117,7 @@ (do @ [expected (|> r;nat (:: @ map (n.% +1_000)))] (test "Can parse nat char syntax." - (case (&;parse [default-cursor + (case (&;parse [default-cursor +0 (format "#\"" (text;from-code expected) "\"")]) (#e;Success [_ [_ (#;Nat actual)]]) (n.= expected actual) @@ -168,7 +168,7 @@ (let [bad-match (format (text;from-code x) "\n" (text;from-code y) "\n" (text;from-code z))] - (case (&;parse [default-cursor + (case (&;parse [default-cursor +0 (format "\"" bad-match "\"")]) (#e;Error error) true @@ -182,8 +182,8 @@ good-output (format (text;from-code x) "\n" (text;from-code y) "\n" (text;from-code z))] - (case (&;parse [(|> default-cursor - (update@ #;column (n.+ (n.dec offset-size)))) + (case (&;parse [(|> default-cursor (update@ #;column (n.+ (n.dec offset-size)))) + +0 (format "\"" good-input "\"")]) (#e;Error error) false @@ -193,7 +193,7 @@ parsed (code;text good-output))))) (test "Can handle comments." - (case (&;parse [default-cursor + (case (&;parse [default-cursor +0 (format comment (code;to-text sample))]) (#e;Error error) false @@ -201,7 +201,7 @@ (#e;Success [_ parsed]) (:: code;Eq<Code> = parsed sample))) (test "Will reject unbalanced multi-line comments." - (and (case (&;parse [default-cursor + (and (case (&;parse [default-cursor +0 (format "#(" "#(" unbalanced-comment ")#" (code;to-text sample))]) (#e;Error error) @@ -209,7 +209,7 @@ (#e;Success [_ parsed]) false) - (case (&;parse [default-cursor + (case (&;parse [default-cursor +0 (format "#(" unbalanced-comment ")#" ")#" (code;to-text sample))]) (#e;Error error) |