aboutsummaryrefslogtreecommitdiff
path: root/api/booleans.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'api/booleans.yaml')
-rw-r--r--api/booleans.yaml18
1 files changed, 6 insertions, 12 deletions
diff --git a/api/booleans.yaml b/api/booleans.yaml
index 1d9d68fd..88d81196 100644
--- a/api/booleans.yaml
+++ b/api/booleans.yaml
@@ -20,17 +20,11 @@ Bool.parse:
If non-none, this argument will be set to the remainder of the text after the matching part.
If none, parsing will only succeed if the entire text matches.
example: |
- >> Bool.parse("yes")
- = yes : Bool?
- >> Bool.parse("no")
- = no : Bool?
- >> Bool.parse("???")
- = none : Bool?
+ assert Bool.parse("yes") == yes
+ assert Bool.parse("no") == no
+ assert Bool.parse("???") == none
- >> Bool.parse("yesJUNK")
- = none : Bool?
+ assert Bool.parse("yesJUNK") == none
remainder : Text
- >> Bool.parse("yesJUNK", &remainder)
- = yes : Bool?
- >> remainder
- = "JUNK"
+ assert Bool.parse("yesJUNK", &remainder) == yes
+ assert remainder == "JUNK"