1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-23 19:57:40 +00:00

Get rid of early termination rule in all finite loops.

This commit is contained in:
Calvin Rose
2025-02-03 07:36:00 -06:00
parent d30fd27575
commit 6da44bdb6a
2 changed files with 9 additions and 6 deletions

View File

@@ -789,13 +789,16 @@
"abc123"
@["abc123"])
# Issue 1554
(test "issue 1554 case 1" '(any (> '1)) "abc" @["a"])
(test "issue 1554 case 2" '(any (? (> '1))) "abc" @["a"])
(test "issue 1554 case 3" '(any (> (? '1))) "abc" @["a"])
# Issue 1554 - 0-width match termination behavior
(test "issue 1554 case 1" '(any (> '1)) "abc" @[])
(test "issue 1554 case 2" '(any (? (> '1))) "abc" @[])
(test "issue 1554 case 3" '(any (> (? '1))) "abc" @[])
(test "issue 1554 case 4" '(* "a" (> '1)) "abc" @["b"])
(test "issue 1554 case 5" '(* "a" (? (> '1))) "abc" @["b"])
(test "issue 1554 case 6" '(* "a" (> (? '1))) "abc" @["b"])
(test "issue 1554 case 7" '(between 0 2 (> '1)) "abc" @["a" "a"])
(test "issue 1554 case 8" '(between 2 3 (? (> '1))) "abc" @["a" "a" "a"])
(test "issue 1554 case 9" '(between 0 0 (> (? '1))) "abc" @[])
(end-suite)