diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-05 03:47:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-05 03:47:15 -0400 |
| commit | 73df39ff7e769c705496cf5eb0ba4681e967dcec (patch) | |
| tree | 423017bcd2297728f5fbf95b16cb2a786119844d /test/text.tm | |
| parent | e3cc4f88e015a2ca06a5b53c3908ed45d2d6daf2 (diff) | |
Fix stability of concatenation
Diffstat (limited to 'test/text.tm')
| -rw-r--r-- | test/text.tm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm index 0a34e2a0..450d8ae9 100644 --- a/test/text.tm +++ b/test/text.tm @@ -256,3 +256,20 @@ func main(): >> "Abc":repeat(3) = "AbcAbcAbc" + + do: + !! Testing concatenation-stability: + >> ab := Text.from_codepoint_names(["LATIN SMALL LETTER E", "COMBINING VERTICAL LINE BELOW"]) + >> ab:codepoint_names() + = ["LATIN SMALL LETTER E", "COMBINING VERTICAL LINE BELOW"] + >> ab.length + = 1 + + >> a := Text.from_codepoint_names(["LATIN SMALL LETTER E"]) + >> b := Text.from_codepoint_names(["COMBINING VERTICAL LINE BELOW"]) + >> (a++b):codepoint_names() + = ["LATIN SMALL LETTER E", "COMBINING VERTICAL LINE BELOW"] + >> (a++b) == ab + = yes + >> (a++b).length + = 1 |
