diff --git a/tests/bonsai/dj.mk b/tests/bonsai/dj.mk index 9c27927..402abd6 100755 --- a/tests/bonsai/dj.mk +++ b/tests/bonsai/dj.mk @@ -12,7 +12,7 @@ /dev/null: .PHONY: dj_tests -dj_tests: dj_full dj_help dj_null # dj_skip_stdin +dj_tests: dj_help dj_full dj_null # dj_skip_stdin .PHONY: dj_full # Linux has a /dev/full pseudodevice useful for testing errors. @@ -20,7 +20,8 @@ dj_full: $(BIN)/dj /dev/full case "$$(uname)" in \ Linux) \ $(BIN)/dj -Hi /dev/zero -o /dev/full 2>&1 \ - | xargs -I out test '1+0 > 0+0; 1024 > 0' = out \ + | tee /dev/tty \ + | xargs -I out test '1+0 > 0+0; 1024 > 0' = out \ ;; \ esac @@ -32,11 +33,16 @@ dj_help: $(BIN)/dj # Read nothing from /dev/null, write nothing to /dev/null. dj_null: $(BIN)/dj /dev/null $(BIN)/dj -Hi /dev/null -o /dev/null 2>&1 \ + | tee /dev/tty \ | xargs -I out test '0+0 > 0+0; 0 > 0' = out +# This test currently fails. This is probably due to dj(1) being stale relative +# to the main harakit branch. TODO: Reassess once the testing branch is merged. # .PHONY: dj_skip_stdin +# # Test skipping stdin. # dj_skip_stdin: $(BIN)/dj - # Test skipping stdin. - #dd count=1 bs=1024 /dev/null \ - # | $(BIN)/dj -H -s 24 -o /dev/null 2>&1 \ - # | xargs -I out test '1+0 > 1+0; 1024 > 1000' = out +# # Pipe 1024B of '\0' into dj(1); skip the first 24B; expect 1000B written. +# dd count=1 bs=1024 /dev/null \ +# | $(BIN)/dj -H -s 24 -o /dev/null 2>&1 \ +# | tee /dev/tty \ +# | xargs -I out test '1+0 > 1+0; 1024 > 1000' = out