diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/tests/string/find.asy |
Initial commit
Diffstat (limited to 'graphics/asymptote/tests/string/find.asy')
-rw-r--r-- | graphics/asymptote/tests/string/find.asy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/asymptote/tests/string/find.asy b/graphics/asymptote/tests/string/find.asy new file mode 100644 index 0000000000..cdf6dc6740 --- /dev/null +++ b/graphics/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(); |