summaryrefslogtreecommitdiff
path: root/graphics/asymptote/tests/string/erase.asy
blob: 2b38b61f3593e873ee683b3bcfd342abef4eaea1 (plain)
1
2
3
4
5
6
7
8
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();