aboutsummaryrefslogtreecommitdiff
path: root/test/text.tm
diff options
context:
space:
mode:
Diffstat (limited to 'test/text.tm')
-rw-r--r--test/text.tm8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm
index 6c23042d..8f0da922 100644
--- a/test/text.tm
+++ b/test/text.tm
@@ -208,3 +208,11 @@ func main()
assert "one two".find("two") == 5
assert "one two".find("three") == none
assert "one two".find("o", start=2) == 7
+
+
+ assert "hello".distance("hello") == 0
+ assert "hello".distance("goodbye") > 2.0
+ assert "hello".distance("hola") < "hello".distance("goodbye")
+ assert "hello".distance("Hello") <= 1.0
+ assert "hello".distance("xello") <= 1.0
+ assert "hello".distance("ehllo") <= "hello".distance("XXllo")