leetcode-cli
leetcode-cli copied to clipboard
[Feature Request] Print new line in stdout of "test" command
test command doesn't interpret '\n' characters in stdout like follows.
> leetcode test solution.java
Input data:
[7,2,5,10,8]
2
Actual
✘ Runtime Error
✘ runtime: N/A
✘ answer:
✘ stdout: 'low:16\nhigh:32'
✘ error: Line 14: java.lang.ArrayIndexOutOfBoundsException: -1
stdout is very useful when debugging while all logs being printed in a single line is pretty hard to understand. Is it possible to print a new line for each '\n' in stdout?
same problem
I tried modifying the config file without success, but after querying google, I am now temporarily using the awk command to replace \n
like
lc test 1252.cells-with-odd-values-in-a-matrix.cpp | awk '{gsub(/\\n/,"\n")}1'