mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
bin: offset should add to skip, not override it
This commit is contained in:
1 parent
d69a7d8e04
commit
524a6c607f
3 files changed
+25
-4
No files matched your search
@@ -94,3 +94,20 @@ fn display_offset() {
|
||||
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘\n",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn display_offset_and_skip() {
|
||||
hexyl()
|
||||
.arg("hello_world_elf64")
|
||||
.arg("--color=never")
|
||||
.arg("--display-offset=0x20")
|
||||
.arg("--skip=0x10")
|
||||
.arg("--length=0x10")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(
|
||||
"┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐\n\
|
||||
│00000030│ 02 00 3e 00 01 00 00 00 ┊ 00 10 40 00 00 00 00 00 │•0>0•000┊0•@00000│\n\
|
||||
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘\n",
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user