mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
library/string.m:
Define behaviour of char_to_string when the string is not
well-formed or if the char is a surrogate code point.
Implement char_to_string/2 using multiple clauses
as the described behaviour doesn't match to_char_list/2.
tests/hard_coded/Mmakefile:
tests/hard_coded/char_to_string.exp:
tests/hard_coded/char_to_string.exp2:
tests/hard_coded/char_to_string.m:
Add test case.
12 lines
252 B
Plaintext
12 lines
252 B
Plaintext
exception: software_error("predicate `string.from_char_list\'/2: Unexpected: null character or surrogate code point in list")
|
|
succeeded: 0xd83d
|
|
succeeded: 0xde00
|
|
succeeded: 😀
|
|
|
|
failed
|
|
failed
|
|
failed
|
|
succeeded: 0xd83d
|
|
succeeded: 0xde00
|
|
succeeded: 😀
|