Skip to content

Commit

Permalink
TEST: Disable collation_key/2 test for MacOS
Browse files Browse the repository at this point in the history
Macos Sequoia (15) wcsxfrm() returns garbage.
  • Loading branch information
JanWielemaker committed Oct 23, 2024
1 parent 8411687 commit e0dcf53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Tests/core/test_locale.pl
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,10 @@

:- begin_tests(collation_key).

test('WCSXFRM_BUFFER_OVERRUN', true) :-
findall(C, between(32,1000,C), Codes),
% MacOS 15 wcsxfrm(() returns invalid data
test('WCSXFRM_BUFFER_OVERRUN',
[condition(\+ current_prolog_flag(apple, true))]) :-
findall(C, (between(32,1000,C), code_type(C, print)), Codes),
atom_codes(Atom, Codes),
collation_key(Atom, _Key).

Expand Down
2 changes: 1 addition & 1 deletion src/pl-prims.c
Original file line number Diff line number Diff line change
Expand Up @@ -4391,7 +4391,7 @@ PRED_IMPL("atom_number", 2, atom_number, 0)
* buffer is short. Thanks to Samer Abdallah for sorting this out.
*
* (*) On failure, wcsxfrm() normally returns the required size.
* The official docs are not completely explicit abut this though
* The official docs are not completely explicit about this though
* and it appears MacOS 15 (beta) does not, requiring another
* iteration. We now allow for 5 iterations ...
*/
Expand Down

0 comments on commit e0dcf53

Please sign in to comment.