Raku / whateverable

🤖 Different IRC bots that operate on a bunch of prebuilt Rakudo versions
https://gist.github.com/Whateverable
GNU Affero General Public License v3.0
18 stars 14 forks source link

Preserve last newline #264

Closed AlexDaniel closed 5 years ago

AlexDaniel commented 6 years ago

https://irclog.perlgeek.de/perl6/2017-11-28#i_15502128

Currently the output of any command is chomped: https://github.com/perl6/whateverable/blob/46337991a954885fe4c535319275bbb6f797b391/lib/Whateverable.pm6#L234

Which is right in all cases except when we are eval-ing stuff. So basically we'll have to remove the .chomp there and add it back in all places where get-output sub is used.

Alternatively get-output can take a :chomp named arg (that'd be easier to implement).

AlexDaniel commented 6 years ago

Actually, this was done in https://github.com/perl6/whateverable/commit/2ae0d7012caf0e57a548d6983adc05939ce651b9. Tests needed.

AlexDaniel commented 5 years ago

There are a bunch of tests that check evalable's output, so this is definitely tested.