fix bug in #parse code path
add test for #parse with custom parser
add test to ktest