Closed baderj closed 2 years ago
Hey! The one pathetic test I wrote for peek
fails, but I would suggest we simply change the test: I understand now what happened there: In the test, I specify 14 lines of output, and then require that peek
produces 14 lines of output. Past me did not realize that the hexdump
function will not count this type of line:
..: === repeats 2 times === ========
towards the maximum. Hence, to get all the lines of output we want from the test, we should require 15 lines.
TL/DR: Would you do me a favour and change the 14 to a 15 over here and include that in the pull request?
That should greenlight the test. Kindof a cheeky solution, but I am ok with it ;-).
PS: I could also just merge this PR and then fix the tests later, but this is my first experience merging something while using the GitHub actions CI pipeline. In theory, we should be able to get the tests all green, and I am super curious to see that work =). I figured this PR is straightforward enough to give me that small pleasure.
Awesome, thank you very much @baderj!
The hexdump preview of
peek
displays one more line than specified.So
peek
without-l / --lines
shows 11 lines instead of the default 10. You can see the bug in https://github.com/binref/refinery/blob/master/tutorials/tbr-files.v0x01.netwalker.dropper.ipynb which always shows 11 lines forpeek
when called without-l / --lines
.For example before:
This pull request fixes the bug which was caused by a simple
>
instead of>=
check.