Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/hexdump/tests/hexdump_test.sh
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
atf_test_case s_flag | atf_test_case s_flag | ||||
s_flag_head() | s_flag_head() | ||||
{ | { | ||||
atf_set "descr" "Verify -s output" | atf_set "descr" "Verify -s output" | ||||
} | } | ||||
s_flag_body() | s_flag_body() | ||||
{ | { | ||||
atf_expect_fail "-s option is currently broken due to capsicum (PR 219173)" | |||||
atf_check -o file:"$(atf_get_srcdir)/d_hexdump_sflag_a.out" \ | atf_check -o file:"$(atf_get_srcdir)/d_hexdump_sflag_a.out" \ | ||||
hexdump -bs 4 "$(atf_get_srcdir)/d_hexdump_a.in" | hexdump -bs 4 "$(atf_get_srcdir)/d_hexdump_a.in" | ||||
atf_check -o not-empty hexdump -n 100 -s 1024 /dev/random | atf_check -o not-empty hexdump -n 100 -s 1024 /dev/random | ||||
} | } | ||||
atf_test_case v_flag | atf_test_case v_flag | ||||
v_flag_head() | v_flag_head() | ||||
{ | { | ||||
atf_set "descr" "Verify -v functionality" | atf_set "descr" "Verify -v functionality" | ||||
} | } | ||||
v_flag_body() | v_flag_body() | ||||
{ | { | ||||
atf_expect_fail "-s option is currently broken due to capsicum (PR 219173)" | |||||
for i in $(seq 0 7); do | for i in $(seq 0 7); do | ||||
atf_check -o match:"^\*$" \ | atf_check -o match:"^\*$" \ | ||||
hexdump -s ${i} "$(atf_get_srcdir)/d_hexdump_c.in" | hexdump -s ${i} "$(atf_get_srcdir)/d_hexdump_c.in" | ||||
atf_check -o not-match:"^\*$" \ | atf_check -o not-match:"^\*$" \ | ||||
hexdump -vs ${i} "$(atf_get_srcdir)/d_hexdump_c.in" | hexdump -vs ${i} "$(atf_get_srcdir)/d_hexdump_c.in" | ||||
done | done | ||||
atf_check -o not-match:"^\*$" \ | atf_check -o not-match:"^\*$" \ | ||||
Show All 33 Lines |