aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp.test3
-rw-r--r--tests/dd.test12
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/cp.test b/tests/cp.test
index 6c798b4b..af59593a 100755
--- a/tests/cp.test
+++ b/tests/cp.test
@@ -111,6 +111,9 @@ testing "symlink dest permissions" "cp woot carpenter && stat -c %A carpenter" \
"-rw-r--r--\n" "" ""
rm -rf walrus woot carpenter
+# duplicated --preserve= options are fine.
+testing "--preserve=mode,mode" "cp --preserve=mode,mode walrus walrus2" "" "" ""
+
# cp -r ../source destdir
# cp -r one/two/three missing
# cp -r one/two/three two
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" ""