summaryrefslogtreecommitdiffstats
path: root/tests/ts/hexdump
diff options
context:
space:
mode:
authorOndrej Oprala2014-02-21 15:34:45 +0100
committerKarel Zak2014-03-04 12:48:59 +0100
commit3bf7ede9971bfafc53b1cba8154fc33dfc9f24b9 (patch)
treec97f39c1219250f806a0f152c5f4040bee593eec /tests/ts/hexdump
parentlscpu: read_hypervisor_dmi: only fallback to memory scan on x86/x86_64 (diff)
downloadkernel-qcow2-util-linux-3bf7ede9971bfafc53b1cba8154fc33dfc9f24b9.tar.gz
kernel-qcow2-util-linux-3bf7ede9971bfafc53b1cba8154fc33dfc9f24b9.tar.xz
kernel-qcow2-util-linux-3bf7ede9971bfafc53b1cba8154fc33dfc9f24b9.zip
hexdump: color unit may now be longer than the corresponding format unit
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'tests/ts/hexdump')
-rwxr-xr-xtests/ts/hexdump/highlighting10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/ts/hexdump/highlighting b/tests/ts/hexdump/highlighting
index f3b8c8172..45d1a6c3f 100755
--- a/tests/ts/hexdump/highlighting
+++ b/tests/ts/hexdump/highlighting
@@ -67,7 +67,7 @@ $TS_CMD_HEXDUMP $OPTS $ADDRFMT \
$FILES/ascii.in &> $TS_OUTPUT
ts_finalize_subtest
-# highlight a range longer than the byte count of %o - error
+# highlight a range longer than the byte count of %o
ts_init_subtest "1b_octal-6"
$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
-e '"%07.7_ax " 16/1 "%03o_L[red@193-194] " "\n"' \
@@ -150,7 +150,6 @@ $TS_CMD_HEXDUMP $OPTS $ADDRFMT \
ts_finalize_subtest
# color the current print unit if some or all of the bytes it prints are at offsets 98 and 99
-# (false - range longer than format byte count)
ts_init_subtest "2b_dec-3"
$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
-e '"%07.7_ax " 8/2 " %05u_L[red@97-99] " "\n"' \
@@ -185,6 +184,13 @@ $TS_CMD_HEXDUMP $OPTS $ADDRFMT \
$FILES/ascii.in &> $TS_OUTPUT
ts_finalize_subtest
+# color the current print unit if of the bytes it prints are at offsets 98-102 (multiple print units)
+ts_init_subtest "2b_dec-8"
+$TS_CMD_HEXDUMP $OPTS $ADDRFMT \
+ -e '"%07.7_ax " 8/2 " %05u_L[red@98-102] " "\n"' \
+ $FILES/ascii.in &> $TS_OUTPUT
+ts_finalize_subtest
+
# color the current print unit if some or all of the bytes it prints are at offsets 97 and 99 (true)
ts_init_subtest "4b_dec-1"
$TS_CMD_HEXDUMP $OPTS $ADDRFMT \