Fix Perl compatibility for (SPLIT ... :LIMIT -1).

A negative limit means infinity.
This commit is contained in:
Philipp Marek
2017-03-08 13:00:17 +01:00
parent 0f295337d9
commit 056cbf3990
2 changed files with 8 additions and 0 deletions

View File

@ -142,6 +142,9 @@ frob")
(equal (split ":" "a:b:c:d:e:f:g::" :limit 1000)
'("a" "b" "c" "d" "e" "f" "g" "" ""))
(equal (split ":" "a:b:c:d:e:f:g::" :limit -1)
'("a" "b" "c" "d" "e" "f" "g" "" ""))
(equal (multiple-value-list (regex-replace "fo+" "foo bar" "frob"))
(list "frob bar" t))