tests fo indexOf() and lastIndexOf()