summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/string/find.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/tests/string/find.asy')
-rw-r--r--Build/source/utils/asymptote/tests/string/find.asy8
1 files changed, 8 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/string/find.asy b/Build/source/utils/asymptote/tests/string/find.asy
new file mode 100644
index 00000000000..cdf6dc6740f
--- /dev/null
+++ b/Build/source/utils/asymptote/tests/string/find.asy
@@ -0,0 +1,8 @@
+import TestLib;
+StartTest("find");
+string s = "abcdefab";
+assert(find(s,"cd") == 2);
+assert(find(s,"cd",3) == -1);
+assert(find(s,"ab") == 0);
+assert(find(s,"ab",1) == 6);
+EndTest();