Added -S flag for truncating long lines - #2309
Conversation
338d915 to
c1b6fe9
Compare
|
I added some tests and added the change to the |
c978423 to
26acd63
Compare
26acd63 to
236a2c5
Compare
|
Oops it looks like I had reversed logic and set
I added some tests that cover historical functionality not implemented by this PR because those cases were not yet covered and I wanted to make sure that my changes didn't alter existing functionality. |
| @@ -0,0 +1 @@ | |||
| abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyz | |||
There was a problem hiding this comment.
Shouldn't this file be called 100-columns.txt? Another proposal: long-single-line.txt.
There was a problem hiding this comment.
Oh, I like long-single-line.txt, I'll go with that.
Enselic
left a comment
There was a problem hiding this comment.
Looks good! Just a couple of nit-picks.
| let expected = | ||
| "abcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyzabcdefghigklmnopqrstuvxyz\n"; | ||
|
|
||
| bat() |
There was a problem hiding this comment.
There is a substantial amount of copy-paste here. Would be nice to introduce a helper function that takes as parameter the only thing that varies among the tests (expected output and the wrapping arg).
There was a problem hiding this comment.
Added a helper function.
There was a problem hiding this comment.
I added the helper function in the tests/integration_tests.rs file, but is this the correct procedure? I don't see any other helper functions in this file, so I figured I should ask.
There was a problem hiding this comment.
Yep it was correct to put the helper next to the functions that need it
I don't expect any other code to ever need that helper, so it makes sense to put it where you put it
Enselic
left a comment
There was a problem hiding this comment.
The test code looks much better now, thanks! I found one more comment to make
Co-authored-by: Martin Nordholts <enselic@gmail.com>
Enselic
left a comment
There was a problem hiding this comment.
Looks mergeable to me, thanks!
|
Thank you very much |
Implementation of feature mentioned in issue #2239. Added both
--chop-long-linesand-Sas flags.