@@ -18,14 +18,21 @@ Rebol [
18
18
--assert none? find/part [x] 'x 0
19
19
--assert equal? [x] find/part [x] 'x 1
20
20
--assert equal? [x] find/reverse tail [x] 'x
21
- --assert equal? [y] find/match [x y] 'x
21
+ --assert equal? [x y] find/match [x y] 'x
22
+ --assert equal? [y] find/match/tail [x y] 'x
22
23
--assert equal? [x] find/last [x] 'x
23
24
--assert equal? [x] find/last [x x x] 'x
24
25
25
26
--test-- "FIND string! integer!"
26
27
;@@ https://github.com/Oldes/Rebol-issues/issues/237
27
28
--assert "23" = find "123" 2
28
29
30
+ --test-- "FIND binary! binary!"
31
+ --assert #{ 0001 } = find/match #{ 0001 } #{ 00 }
32
+ --assert #{ 01 } = find/match/tail #{ 0001 } #{ 00 }
33
+ --assert #{ 02 } = find #{ 000102 } #{ 02 }
34
+ --assert #{} = find/tail #{ 000102 } #{ 02 }
35
+
29
36
--test-- "FIND string! tag!"
30
37
;@@ https://github.com/Oldes/Rebol-issues/issues/1160
31
38
--assert "<a>" = find "<a>" <a >
@@ -58,8 +65,10 @@ Rebol [
58
65
--assert "" = find/any/tail "abcd" "*d"
59
66
--assert "" = find/any/tail "abcd" "c*"
60
67
--assert "ef" = find/any/tail "abcdef" "b*d"
61
- --assert "" = find/any/match "abc" "a?c"
62
- --assert "" = find/any/match "abcdef" "a*e?"
68
+ --assert "abc" = find/any/match "abc" "a?c"
69
+ --assert "abcdef" = find/any/match "abcdef" "a*e?"
70
+ --assert "" = find/any/match/tail "abc" "a?c"
71
+ --assert "" = find/any/match/tail "abcdef" "a*e?"
63
72
--assert "bcd" = find/any/reverse tail "abcdabcd" "?c"
64
73
--assert "d" = find/any/reverse/tail tail "abcdabcd" "?c"
65
74
--assert "d" = find/any/reverse/tail tail "abcdabcd" "bc"
@@ -77,8 +86,10 @@ Rebol [
77
86
--assert "žcdef" = find/any "ažcdef" "ž*?*e"
78
87
--assert "" = find/any/tail "ažcd" "*d"
79
88
--assert "ef" = find/any/tail "ažcdef" "ž*d"
80
- --assert "" = find/any/match "ažc" "a?c"
81
- --assert "" = find/any/match "ažcdef" "a*e?"
89
+ --assert "ažc" = find/any/match "ažc" "a?c"
90
+ --assert "ažcdef" = find/any/match "ažcdef" "a*e?"
91
+ --assert "" = find/any/match/tail "ažc" "a?c"
92
+ --assert "" = find/any/match/tail "ažcdef" "a*e?"
82
93
--assert "žcd" = find/any/reverse tail "ažcdažcd" "?c"
83
94
--assert "d" = find/any/reverse/tail tail "ažcdažcd" "?c"
84
95
--assert "d" = find/any/reverse/tail tail "ažcdažcd" "žc"
0 commit comments