aboutsummaryrefslogtreecommitdiff
path: root/test/text.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-07-11 16:05:54 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-07-11 16:05:54 -0400
commit4153c0af9d4dcc43c0a67cc446a313c46ee5ac33 (patch)
tree246154cdf41f487f6d2da2c6b6df5aba50531ab6 /test/text.tm
parenta51d48201b5245dc2cc2bfb00e0ac8e7b52203d9 (diff)
parent46b0dbc5a448249ddc9a6ce20465f0fa41de6d64 (diff)
Merge branch 'main' into decimalsdecimals
Diffstat (limited to 'test/text.tm')
-rw-r--r--test/text.tm21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/text.tm b/test/text.tm
index 9634f17d..ff55555d 100644
--- a/test/text.tm
+++ b/test/text.tm
@@ -46,8 +46,7 @@ func main()
>> "\[31;1]"
= "\e[31;1m"
- >> "\{UE9}" == "\{U65}\{U301}"
- = yes
+ assert "\{UE9}" == "\{U65}\{U301}"
amelie := "Am\{UE9}lie"
>> amelie.split()
@@ -120,12 +119,9 @@ func main()
c := "É̩"
>> c.codepoint_names()
= ["LATIN CAPITAL LETTER E WITH ACUTE", "COMBINING VERTICAL LINE BELOW"]
- >> c == Text.from_codepoint_names(c.codepoint_names())!
- = yes
- >> c == Text.from_codepoints(c.utf32_codepoints())
- = yes
- >> c == Text.from_bytes(c.bytes())!
- = yes
+ assert c == Text.from_codepoint_names(c.codepoint_names())!
+ assert c == Text.from_codepoints(c.utf32_codepoints())
+ assert c == Text.from_bytes(c.bytes())!
>> "one\ntwo\nthree".lines()
= ["one", "two", "three"]
@@ -248,8 +244,7 @@ func main()
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
+ assert (a++b) == ab
>> (a++b).length
= 1
@@ -270,14 +265,12 @@ func main()
final := Text.from_codepoints([Int32(0x65), Int32(0x300), Int32(0x302), Int32(0x303)])
>> final.length
= 1
- >> concat3 == final
- = yes
+ assert concat3 == final
concat4 := Text.from_codepoints([Int32(0x65), Int32(0x300)]) ++ Text.from_codepoints([Int32(0x302), Int32(0x303)])
>> concat4.length
= 1
- >> concat4 == final
- = yes
+ assert concat4 == final
>> "x".left_pad(5)
= " x"