add test for within_frame with frame index

see #185