Add test cases for zero length (ref gh-41).