mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 02:13:54 +00:00
library/string.m:
Add predicate to test if a string is in UTF-8 or UTF-16,
depending on the target language.
NEWS:
Announce the addition.
tests/hard_coded/string_well_formed.exp:
tests/hard_coded/string_well_formed.m:
Add basic test case.
tests/hard_coded/string_well_formed_utf8.exp:
tests/hard_coded/string_well_formed_utf8.exp2:
tests/hard_coded/string_well_formed_utf8.exp3:
tests/hard_coded/string_well_formed_utf8.inp:
tests/hard_coded/string_well_formed_utf8.m:
Add more thorough test for UTF-8. The input file is from
https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
tests/hard_coded/Mmakefile:
Enable the tests.
7 lines
137 B
Plaintext
7 lines
137 B
Plaintext
Empty is well-formed
|
|
Good is well-formed
|
|
Bad1 is not well-formed
|
|
Bad2 is not well-formed
|
|
Bad3 is not well-formed
|
|
Bad4 is not well-formed
|