From bc251026c21590da76085bc0bc9abeaa5ec242b6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 23 Aug 2018 00:56:59 -0400 Subject: No more escaping of new-line. --- stdlib/test/test/lux/compiler/default/syntax.lux | 6 +++--- stdlib/test/test/lux/macro/syntax.lux | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/compiler/default/syntax.lux b/stdlib/test/test/lux/compiler/default/syntax.lux index e24779057..829199aa8 100644 --- a/stdlib/test/test/lux/compiler/default/syntax.lux +++ b/stdlib/test/test/lux/compiler/default/syntax.lux @@ -30,7 +30,7 @@ (do r.Monad [#let [digits "0123456789" delimiters (format "()[]{}#." &.text-delimiter) - space " \n" + space (format " " text.new-line) invalid-range (format digits delimiters space) char-gen (|> r.nat (:: @ map (|>> (n/% 256) (n/max 1))) @@ -114,7 +114,7 @@ (def: comment-text^ (r.Random Text) - (let [char-gen (|> r.nat (r.filter (|>> (n/= (char "\n")) not)))] + (let [char-gen (|> r.nat (r.filter (|>> (n/= (`` (char (~~ (static text.new-line))))) not)))] (do r.Monad [size (|> r.nat (r/map (n/% 20)))] (r.text char-gen size)))) @@ -123,7 +123,7 @@ (r.Random Text) (do r.Monad [comment comment-text^] - (wrap (format "## " comment "\n")))) + (wrap (format "## " comment text.new-line)))) (context: "Multi-line text & comments." (<| (seed 12137892244981970631) diff --git a/stdlib/test/test/lux/macro/syntax.lux b/stdlib/test/test/lux/macro/syntax.lux index b1e2f445b..0bf7b8804 100644 --- a/stdlib/test/test/lux/macro/syntax.lux +++ b/stdlib/test/test/lux/macro/syntax.lux @@ -75,9 +75,9 @@ ["Can parse Bit syntax." #1 code.bit bit.Equivalence s.bit] ["Can parse Nat syntax." 123 code.nat number.Equivalence s.nat] ["Can parse Int syntax." +123 code.int number.Equivalence s.int] - ["Can parse Rev syntax." .123 code.rev number.Equivalence s.rev] + ["Can parse Rev syntax." .123 code.rev number.Equivalence s.rev] ["Can parse Frac syntax." +123.0 code.frac number.Equivalence s.frac] - ["Can parse Text syntax." "\n" code.text text.Equivalence s.text] + ["Can parse Text syntax." text.new-line code.text text.Equivalence s.text] ["Can parse Identifier syntax." ["yolo" "lol"] code.identifier name.Equivalence s.identifier] ["Can parse Tag syntax." ["yolo" "lol"] code.tag name.Equivalence s.tag] )] -- cgit v1.2.3