getac
getac copied to clipboard
DOS newline breaks the test-case system
I edited the test-case on Windows and forgot the DOS '\r' endline. Getac fail to recognize the test cases. I think this is due to (read-line stream) by default.
As in the doc:
Reads from input-stream a line of text that is terminated by a newline or end of file.
Where, according to this StackOverflow thread:
\r is the character #\return in Common Lisp. \n is the character #\linefeed in Common Lisp. The following ends the string "Hello world." with return and linefeed. #\newline is whatever the platform uses as a line division.
(I think it should be #\Return, but I couldn't find the source)
Solution: Striping the '\r' on every line read.
P/s: I tried using the string-right-trim function, but failed, I don't know Common Lisp.