tests for subr