bin: offset should add to skip, not override it

This commit is contained in:
Tom Milligan authored and David Peter committed 2020-10-31 10:00:03 +01:00
1 parent d69a7d8e04
commit 524a6c607f
3 files changed
+25 -4

No files matched your search

+17
View File
@@ -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",
);
}