mirror of
https://github.com/janet-lang/janet
synced 2025-10-18 17:27:40 +00:00
Address issue #180 - string/check-set
Fix the function and add test to further clarify that implementation is correct. Also fix empty string case.
This commit is contained in:
@@ -132,8 +132,9 @@
|
||||
(assert (string/check-set "abc" "a") "string/check-set 1")
|
||||
(assert (not (string/check-set "abc" "z")) "string/check-set 2")
|
||||
(assert (string/check-set "abc" "abc") "string/check-set 3")
|
||||
(assert (not (string/check-set "abc" "")) "string/check-set 4")
|
||||
(assert (string/check-set "abc" "") "string/check-set 4")
|
||||
(assert (not (string/check-set "" "aabc")) "string/check-set 5")
|
||||
(assert (not (string/check-set "abc" "abcdefg")) "string/check-set 6")
|
||||
|
||||
# Marshal and unmarshal pegs
|
||||
(def p (-> "abcd" peg/compile marshal unmarshal))
|
||||
|
Reference in New Issue
Block a user