aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/text/escape.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index edce881aa..43dde1c22 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -12,8 +12,8 @@
[parser
["<[0]>" code]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
- ["[0]" text {"+" [Char]} ("[1]\[0]" equivalence)
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text {"+" [Char]} ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" set {"+" [Set]}]]]
@@ -34,7 +34,7 @@
(def: (range max min)
(-> Char Char (Random Char))
(let [range (n.- min max)]
- (\ random.monad each
+ (# random.monad each
(|>> (n.% range) (n.+ min))
random.nat)))
@@ -93,7 +93,7 @@
[/.\n] [/.\v] [/.\f] [/.\r]
[/.\''] [/.\\])))
(/.escapable? ascii)
- (bit\= (/.escapable? ascii)
+ (bit#= (/.escapable? ascii)
(or (n.< (debug.private /.ascii_bottom) ascii)
(n.> (debug.private /.ascii_top) ascii)))))))
(do random.monad
@@ -106,15 +106,15 @@
(let [escaped (/.escaped expected)]
(case (/.un_escaped escaped)
{try.#Success un_escaped}
- (and (not (text\= escaped expected))
- (text\= un_escaped expected))
+ (and (not (text#= escaped expected))
+ (text#= un_escaped expected))
{try.#Failure error}
false))
- (text\= expected (/.escaped expected))))))
+ (text#= expected (/.escaped expected))))))
(do [! random.monad]
[dummy (|> (random.char unicode.character)
- (\ ! each text.of_char))]
+ (# ! each text.of_char))]
(_.cover [/.dangling_escape]
(case (/.un_escaped (format (/.escaped dummy) "\"))
{try.#Success _}
@@ -125,7 +125,7 @@
(do [! random.monad]
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
- (\ ! each text.of_char))]
+ (# ! each text.of_char))]
(_.cover [/.invalid_escape]
(case (/.un_escaped (format "\" dummy))
{try.#Success _}
@@ -135,10 +135,10 @@
(exception.match? /.invalid_escape error))))
(do [! random.monad]
[too_short (|> (random.char unicode.character)
- (\ ! each (n.% (hex "1000"))))
+ (# ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
- (case (\ n.hex decoded code)
+ (case (# n.hex decoded code)
{try.#Failure error} true
{try.#Success _} false))))]
(_.cover [/.invalid_unicode_escape]
@@ -149,9 +149,9 @@
{try.#Failure error}
(exception.match? /.invalid_unicode_escape error))]]
- (and (!invalid (\ n.hex encoded too_short))
+ (and (!invalid (# n.hex encoded too_short))
(!invalid code)))))
(_.cover [/.literal]
(with_expansions [<example> (..static_sample)]
- (text\= <example> (`` (/.literal (~~ (..static_escaped <example>)))))))
+ (text#= <example> (`` (/.literal (~~ (..static_escaped <example>)))))))
)))