add testcases, prevent global leak of parseError