bottom-rs
bottom-rs copied to clipboard
πβ¨β¨,,,ππβ¨β¨β¨,,ππππβ¨π₯Ί,ππππ,,,,πππππ₯Ίππππβ¨πππππ₯Ί,,ππβ¨β¨β¨,,πππβ¨β¨,,,ππβ¨β¨β¨,,ππππ,,ππππβ¨,ππππβ¨π₯Ί,,ππππβ¨ππππππβ¨β¨β¨,,πππβ¨β¨β¨β¨π₯Ί,,ππππβ¨ππβ¨β¨β¨,,ππππ,ππππππππ,,,ππππ,ππβ¨β¨β¨,,πππβ¨β¨β¨β¨π₯Ί,,,,πππβ¨β¨β¨β¨π₯Ί,,ππππβ¨π₯Ίππππ,ππβ¨β¨β¨β¨π₯Ί,ππβ¨β¨β¨β¨π₯Ί,ππβ¨β¨β¨β¨π₯Ί,ππ
πβ¨β¨β¨π₯Ί,,ππππ,,,,πππβ¨β¨β¨β¨π₯Ί,,ππππβ¨π₯Ί,ππβ¨β¨β¨,,πππβ¨β¨,,,ππβ¨β¨β¨,,πππβ¨π₯Ί,,,πππππ₯Ίππππππ
./bottomify --bottomify "something" | ./bottomify --regress --input /dev/stdin
πβ¨π₯Ί,,,,ππππβ¨β¨ππππβ¨,,ππππ,πππβ¨β¨β¨β¨π₯Ί,,,,ππππβ¨π₯Ί,ππππ,ππππππ
ππβ¨π₯Ί,ππππ,,,,πππππ₯Ίππππβ¨π₯Ίππβ¨β¨β¨,,ππππππππβ¨,ππππ,ππππβ¨π₯Ίππβ¨β¨β¨,,ππππβ¨ππππβ¨,ππππβ¨π₯Ί,ππβ¨β¨β¨,,ππππ,ππππβ¨,,,,ππππβ¨,,,,ππππβ¨,ππππβ¨,,,,ππ
πβ¨π₯Ίπππβ¨β¨β¨β¨π₯Ί,,,,ππππβ¨π₯Ί,ππππβ¨π₯Ί,,πππβ¨β¨β¨β¨π₯Ί,,πππππ₯Ί,,,ππ
πβ¨π₯Ί,,,,ππππβ¨,,,,ππππβ¨,,,,ππππβ¨,ππππβ¨,,,,ππππ₯Ί,,,ππβ¨β¨β¨,,πππβ¨β¨β¨,,,,ππππ,,,,ππππ,ππβ¨β¨β¨,,πππππ₯Ίππππβ¨ππππβ¨,,ππππβ¨π₯Ί,,ππππβ¨π₯Ί,ππβ¨β¨β¨,,ππππβ¨π₯Ί,,,,πππβ¨β¨β¨β¨π₯Ί,,ππππβ¨π₯Ίππβ¨β¨β¨,,πππππ₯Ίππππβ¨ππππβ¨π₯Ί,,,πππβ¨β¨β¨β¨π₯Ί,,πππππ₯Ί,,,πππππ₯Ίππππππβ¨β¨β¨β¨π₯Ί,ππ
πππ₯Ίππππβ¨π₯Ί,ππβ¨β¨β¨,,ππππβ¨,,ππππβ¨,,,,πππππ₯Ίππππβ¨ππππβ¨π₯Ί,ππππβ¨π₯Ίππ
οΏ½
πππ₯Ίππππβ¨ππβ¨β¨β¨,,ππππβ¨π₯Ί,ππππ,,,,ππππ,ππβ¨β¨β¨,,ππππβ¨,ππππβ¨π₯Ί,,ππππβ¨π₯Ί,ππππβ¨,,ππππβ¨π₯Ί,,ππππβ¨π₯Ί,ππ
For the sake of everyone else's sanity:
I think I found an edge case...Error: invalid character
What I Did
./bottomify --bottomify "something" | ./bottomify --regress --input /dev/stdin
Expected:
this does not error
Actual:
Error: The input was invalid.
it prints οΏ½ in the output
This can be fixed by changing "input.trim_end_matches" to "input.trim_end().trim_end_matches" in src/bottom.rs, but I have no idea if that's the best way to do it.
I think stdin's EOF marker could be causing it.
Looking at it a little more, it's because src/main.rs uses println to write output to the console, which adds a newline to the end of the output. Then when it's read back in from stdin the newline on the end causes the decoder to fail because it doesn't handle whitespace.
Found something new: specifying the arguments -o /dev/stdout
gets rid of the error.
Example:
printf "%s" "Hello world!" | ./bottomify -b -i /dev/stdin -o /dev/stdout | ./bottomify -r -i /dev/stdin