mirror of
https://github.com/janet-lang/janet
synced 2025-10-15 15:57:41 +00:00
Address #640.
Allow for a zero length match at the end of a string when using the to or thru combinators.
This commit is contained in:
@@ -473,4 +473,12 @@
|
||||
|
||||
(check-deep '(* (int 2) -1) "123" nil)
|
||||
|
||||
# to/thru bug
|
||||
(check-deep '(to -1) "aaaa" @[])
|
||||
(check-deep '(thru -1) "aaaa" @[])
|
||||
(check-deep ''(to -1) "aaaa" @["aaaa"])
|
||||
(check-deep ''(thru -1) "aaaa" @["aaaa"])
|
||||
(check-deep '(to "b") "aaaa" nil)
|
||||
(check-deep '(thru "b") "aaaa" nil)
|
||||
|
||||
(end-suite)
|
||||
|
Reference in New Issue
Block a user