refactor parser test and add more cases