New tests for cursor prefixes

#2061