summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/string/erase.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/tests/string/erase.asy')
-rw-r--r--Build/source/utils/asymptote/tests/string/erase.asy9
1 files changed, 9 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/string/erase.asy b/Build/source/utils/asymptote/tests/string/erase.asy
new file mode 100644
index 00000000000..2b38b61f359
--- /dev/null
+++ b/Build/source/utils/asymptote/tests/string/erase.asy
@@ -0,0 +1,9 @@
+import TestLib;
+StartTest("erase");
+string s = "abcdef";
+assert(erase(s,2,2) == "abef");
+assert(erase(s,-1,2) == "abcdef");
+assert(erase(s,7,1) == "abcdef");
+assert(erase(s,3,0) == "abcdef");
+assert(erase(s,5,2) == "abcde");
+EndTest();