summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/string/rfind.asy
blob: 2291097a7ed23798c9d7fb9421dae0bb28b43d62 (plain)
1
2
3
4
5
6
7
8
import TestLib;
StartTest("rfind");
string s = "abcdefab";
assert(rfind(s,"cd") == 2);
assert(rfind(s,"cd",1) == -1);
assert(rfind(s,"ab") == 6);
assert(rfind(s,"ab",5) == 0);
EndTest();