Add a test for #30, close #30