aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/text/regex.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data/text/regex.lux')
-rw-r--r--stdlib/source/test/lux/data/text/regex.lux30
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux
index a31b6247b..787d432a6 100644
--- a/stdlib/source/test/lux/data/text/regex.lux
+++ b/stdlib/source/test/lux/data/text/regex.lux
@@ -22,7 +22,7 @@
[\\library
["[0]" /]])
-(def: (should_pass regex input)
+(def (should_pass regex input)
(-> (Parser Text) Text Bit)
(|> input
(<text>.result regex)
@@ -33,7 +33,7 @@
_
#0)))
-(def: (text_should_pass test regex input)
+(def (text_should_pass test regex input)
(-> Text (Parser Text) Text Bit)
(|> input
(<text>.result regex)
@@ -44,7 +44,7 @@
_
false)))
-(def: (should_fail regex input)
+(def (should_fail regex input)
(All (_ a) (-> (Parser a) Text Bit))
(|> input
(<text>.result regex)
@@ -55,7 +55,7 @@
_
false)))
-(def: should_check
+(def should_check
(syntax (_ [pattern <code>.any
regex <code>.any
input <code>.any])
@@ -69,7 +69,7 @@
(~ g!_)
false))))))))
-(def: basics
+(def basics
Test
(_.property "Can parse character literals."
(and (should_pass (/.regex "a") "a")
@@ -77,7 +77,7 @@
(should_pass (/.regex "\.") ".")
(should_fail (/.regex "\.") "a"))))
-(def: system_character_classes
+(def system_character_classes
Test
(all _.and
(_.property "Can parse anything."
@@ -108,7 +108,7 @@
(should_fail (/.regex "\W") "a")))
))
-(def: special_system_character_classes
+(def special_system_character_classes
Test
(all _.and
(_.property "Lower-case."
@@ -155,7 +155,7 @@
(should_fail (/.regex "\p{Print}") (text.of_char (hex "1234")))))
))
-(def: custom_character_classes
+(def custom_character_classes
Test
(all _.and
(_.property "Can parse using custom character classes."
@@ -194,7 +194,7 @@
(should_fail RE "p")))))
))
-(def: references
+(def references
Test
(let [number (/.regex "\d+")]
(_.property "Can build complex regexs by combining simpler ones."
@@ -202,7 +202,7 @@
(/.regex "(\@<number>)-(\@<number>)-(\@<number>)")
"809-345-6789"))))
-(def: fuzzy_quantifiers
+(def fuzzy_quantifiers
Test
(all _.and
(_.property "Can sequentially combine patterns."
@@ -222,7 +222,7 @@
(should_fail (/.regex "a+") "")))
))
-(def: crisp_quantifiers
+(def crisp_quantifiers
Test
(all _.and
(_.property "Can match a pattern N times."
@@ -244,7 +244,7 @@
(text_should_pass "aa" (/.regex "a{1,2}") "aa")))
))
-(def: groups
+(def groups
Test
(all _.and
(_.property "Can extract groups of sub-matches specified in a pattern."
@@ -260,7 +260,7 @@
(should_check ["809-345-6789" "809" ["345-6789" "345" "6789"]] (/.regex "(\d{3})-((\d{3})-(\d{4}))") "809-345-6789"))
))
-(def: alternation
+(def alternation
Test
(all _.and
(_.property "Can specify alternative patterns."
@@ -277,7 +277,7 @@
"123-456-7890")))
))
-(def: expands?
+(def expands?
(syntax (_ [form <code>.any])
(function (_ lux)
{try.#Success [lux (list (code.bit (case (macro.single_expansion form lux)
@@ -287,7 +287,7 @@
{try.#Failure error}
false)))]})))
-(def: .public test
+(def .public test
Test
(<| (_.covering /._)
(all _.and