From 0b7ca098ae1dc5e31485bc505a441d3796f0702b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 4 Mar 2024 01:34:12 -0500 Subject: Fix some bugs relating to NUL termination of strings --- test/text.tm | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/text.tm b/test/text.tm index 690bb57a..c842a36d 100644 --- a/test/text.tm +++ b/test/text.tm @@ -15,10 +15,39 @@ >> \UE9 == \U65\U301 = yes ->> amelie := "Amélie" +>> amelie := "Am{\UE9}lie" >> amelie:clusters() = ["A", "m", "é", "l", "i", "e"] : [Text] >> amelie:codepoints() = [65_i32, 109_i32, 101_i32, 769_i32, 108_i32, 105_i32, 101_i32] : [Int32] >> amelie:bytes() = [65_i8, 109_i8, 101_i8, -52_i8, -127_i8, 108_i8, 105_i8, 101_i8] : [Int8] +>> #amelie += 6 +>> amelie:num_clusters() += 6 +>> amelie:num_codepoints() += 7 +>> amelie:num_bytes() += 8 + +>> amelie2 := "Am{\U65\U301}lie" +>> amelie2:clusters() += ["A", "m", "é", "l", "i", "e"] : [Text] +>> amelie2:codepoints() += [65_i32, 109_i32, 101_i32, 769_i32, 108_i32, 105_i32, 101_i32] : [Int32] +>> amelie2:bytes() += [65_i8, 109_i8, 101_i8, -52_i8, -127_i8, 108_i8, 105_i8, 101_i8] : [Int8] +>> #amelie += 6 +>> amelie2:num_clusters() += 6 +>> amelie2:num_codepoints() += 7 +>> amelie2:num_bytes() += 8 + +>> amelie:character_names() += ["LATIN CAPITAL LETTER A", "LATIN SMALL LETTER M", "LATIN SMALL LETTER E", "COMBINING ACUTE ACCENT", "LATIN SMALL LETTER L", "LATIN SMALL LETTER I", "LATIN SMALL LETTER E"] +>> amelie2:character_names() += ["LATIN CAPITAL LETTER A", "LATIN SMALL LETTER M", "LATIN SMALL LETTER E", "COMBINING ACUTE ACCENT", "LATIN SMALL LETTER L", "LATIN SMALL LETTER I", "LATIN SMALL LETTER E"] -- cgit v1.2.3