Skip to content

Commit a48c494

Browse files
committed
Fixed tests to work with older OCaml versions that lack String.for_all.
1 parent 1486cbf commit a48c494

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

tests/core/t_char.ml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,41 @@ q
4343
(fun c -> not @@ CCChar.is_digit_ascii c)
4444
;;
4545

46-
eq true (String.for_all CCChar.is_whitespace_ascii "\n\t \010\011\012\013");;
46+
eq true
47+
(Stdlib.List.for_all CCChar.is_whitespace_ascii
48+
[ '\n'; '\t'; ' '; '\010'; '\011'; '\012'; '\013' ])
49+
;;
4750

4851
eq false
49-
(String.for_all CCChar.is_whitespace_ascii
50-
"Hello!--NOthina\055kag$$$%^bch\008h")
52+
(Stdlib.List.for_all CCChar.is_whitespace_ascii
53+
[
54+
'H';
55+
'e';
56+
'l';
57+
'l';
58+
'o';
59+
'!';
60+
'-';
61+
'-';
62+
'N';
63+
'O';
64+
't';
65+
'h';
66+
'i';
67+
'n';
68+
'a';
69+
'\055';
70+
'k';
71+
'a';
72+
'g';
73+
'$';
74+
'$';
75+
'$';
76+
'%';
77+
'^';
78+
'b';
79+
'c';
80+
'h';
81+
'\008';
82+
'h';
83+
])

0 commit comments

Comments
 (0)