add a testsuite, align CR handling with Java™ code