File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 482
482
483
483
for (; index >= head && index < tail ; index += skip ) {
484
484
n = 1 ;
485
- start = pos = index ;
485
+ pos = index ;
486
486
if (c2 == c_some ) {
487
487
n = 0 ;
488
488
goto some_loop ;
489
489
}
490
+ start = pos ;
490
491
if (c2 == c_one ) {
491
492
c1 = c2 ;
492
493
} else {
515
516
while (1 ) {
516
517
if (pos < head || pos >= tail ) return NOT_FOUND ;
517
518
c1 = GET_ANY_CHAR (ser1 , pos );
519
+ // printf("? %c == %c\n", c1, c3);
518
520
if (c1 == c3 ) break ;
519
521
if (uncase && c1 < UNICODE_CASES && c3 < UNICODE_CASES ) {
520
522
if (LO_CASE (c1 ) == LO_CASE (c3 )) break ;
521
523
}
524
+ index ++ ;
522
525
pos ++ ;
523
526
}
524
527
} else if (c3 == c_one ) {
Original file line number Diff line number Diff line change @@ -94,6 +94,24 @@ Rebol [
94
94
--assert "bcd" = find/any/reverse tail "abcdabcd" "?c"
95
95
--assert "d" = find/any/reverse/tail tail "abcdabcd" "?c"
96
96
--assert "d" = find/any/reverse/tail tail "abcdabcd" "bc"
97
+ --assert %abcabc = find/any %abcabc %*bc
98
+ --assert %abxabc = find/any %abxabc %*bc
99
+ --assert %abcabc = find/any %abcabc %ab*
100
+ --assert %cxbc = find/any %abcxbc %c*bc
101
+ --assert %cxbc = find/any %abcxbc %c?bc
102
+ --assert none? find/any %abxabc %c*bc
103
+ --assert none? find/any %abcxxbc %c?bc
104
+ --assert %cxxbc = find/any %abcxxbc %c??bc
105
+ --assert %cxxbcx = find/any %abcxxbcx %c??bc
106
+ --assert %x = find/any/tail %abcxxbcx %c??bc
107
+ --assert %abc = find/any/tail %abcabc %*bc
108
+ --assert %"" = find/any/tail %abxabc %*bc
109
+ --assert "abxcd" = find/any "abxcd" "ab*cd"
110
+ --assert "abxxcd" = find/any "abxxcd" "ab*cd"
111
+ --assert none? find/any "abxcx" "ab*cd"
112
+ --assert "abxcx" = find/any "abxcx" "ab*c?"
113
+ --assert "abxcxe" = find/any "abxcxe" "ab*c?e"
114
+
97
115
98
116
--test-- "FIND/ANY on string (unicode)"
99
117
--assert "ažcd" = find/any "ažcd" "ažc"
You can’t perform that action at this time.
0 commit comments