This is a bit related to #42. A test for parse_cb is needed because lot's of operations happen in this function. But currently i see no good way to test this function. I don't no if mocking the inputstream_* functions would make any sense. And i also see no way of providing a valid stream object for the test.
Would be great if we could share some ideas here on how to test the parse_cb function.