aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-23 00:35:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-23 00:35:05 -0500
commitcb9d3b1a2c2c59c368f6121a16a9ab928b0ff951 (patch)
treedf4c38c993ff78e2e4005058efb66ee1df6f3561 /test
parenta453ebf215e5e3ec3b27fa5142af77d7e3ca0c92 (diff)
Added Text.find(text, target, start=1)
Diffstat (limited to 'test')
-rw-r--r--test/text.tm6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm
index 094da8f8..6c23042d 100644
--- a/test/text.tm
+++ b/test/text.tm
@@ -202,3 +202,9 @@ func main()
assert Text.from_utf32([150370]) == test
assert Text.from_utf16([-10158, -8350]) == test
assert Text.from_utf8([0xf0, 0xa4, 0xad, 0xa2]) == test
+
+
+ assert "one two".find("one") == 1
+ assert "one two".find("two") == 5
+ assert "one two".find("three") == none
+ assert "one two".find("o", start=2) == 7