travis.rb icon indicating copy to clipboard operation
travis.rb copied to clipboard

Only remove trailing newline

Open Aaron1011 opened this issue 11 years ago • 7 comments

Aaron1011 avatar Dec 04 '13 20:12 Aaron1011

That will also remove all empty lines, I think. Could you add a test to reflect the changed behaviour?

rkh avatar Dec 04 '13 20:12 rkh

@henrikhodne: Done

Aaron1011 avatar Dec 05 '13 01:12 Aaron1011

@rkh @henrikhodne: Ping

Aaron1011 avatar Dec 09 '13 21:12 Aaron1011

@Aaron1011 Could you add a test for this as well?

sarahhodne avatar Dec 09 '13 21:12 sarahhodne

@henrikhodne: How would I write a test for this? The modified data (without the trailing newline) gets encrypted, and given as the output of the command.

Aaron1011 avatar Dec 09 '13 22:12 Aaron1011

@Aaron1011 Hmm, good point. We would have to add tests for how things are encrypted, which would require "hijacking" the key by giving some key that we know the private key for, which would require mocking the response at some point.

If you want to try adding tests for it, go ahead, otherwise I guess this might not be as important. @rkh, what do you think?

sarahhodne avatar Dec 09 '13 23:12 sarahhodne

@henrikhodne: (Just seeing this PR again after several months) Should I add tests?

Aaron1011 avatar Jan 26 '14 14:01 Aaron1011