tests for indexOf() and lastIndexOf()