aboutsummaryrefslogtreecommitdiff
path: root/tests/dd.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dd.test')
-rw-r--r--tests/dd.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dd.test b/tests/dd.test
index d2d6033e..7d7b794b 100644
--- a/tests/dd.test
+++ b/tests/dd.test
@@ -95,3 +95,15 @@ testing "status=none" "dd if=input status=none ibs=1 2>&1" "input\n" "input\n" "
testing "seek stdout" "yes 2> /dev/null | dd bs=8 seek=2 count=1 > out 2> /dev/null && xxd -p out" \
"00000000000000000000000000000000790a790a790a790a\n" "" ""
+
+# Duplicated options are fine.
+testing "conv=sync,sync" "dd conv=sync,sync $opt | head -n 1" "I WANT\n" "" "I WANT\n"
+
+# _bytes options
+testing "iflag=count_bytes" \
+ "dd if=input count=2 ibs=4096 iflag=count_bytes $opt" "hi" "high" ""
+testing "iflag=skip_bytes" \
+ "dd if=input skip=2 ibs=4096 iflag=skip_bytes $opt" "gh" "high" ""
+testing "oflag=seek_bytes" \
+ "dd if=input of=output seek=2 obs=4096 oflag=seek_bytes status=none && \
+ xxd -p output" "000030313233\n" "0123" ""