aboutsummaryrefslogtreecommitdiff
path: root/testsuite/dd
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/dd')
-rw-r--r--testsuite/dd/dd-accepts-if2
-rw-r--r--testsuite/dd/dd-accepts-of2
-rw-r--r--testsuite/dd/dd-copies-from-standard-input-to-standard-output1
-rw-r--r--testsuite/dd/dd-prints-count-to-standard-error2
-rw-r--r--testsuite/dd/dd-reports-write-errors2
5 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/dd/dd-accepts-if b/testsuite/dd/dd-accepts-if
new file mode 100644
index 0000000..03d1af8
--- /dev/null
+++ b/testsuite/dd/dd-accepts-if
@@ -0,0 +1,2 @@
+echo I WANT >foo
+test "$(busybox dd if=foo 2>/dev/null)" = "I WANT"
diff --git a/testsuite/dd/dd-accepts-of b/testsuite/dd/dd-accepts-of
new file mode 100644
index 0000000..84405e6
--- /dev/null
+++ b/testsuite/dd/dd-accepts-of
@@ -0,0 +1,2 @@
+echo I WANT | busybox dd of=foo 2>/dev/null
+echo I WANT | cmp foo -
diff --git a/testsuite/dd/dd-copies-from-standard-input-to-standard-output b/testsuite/dd/dd-copies-from-standard-input-to-standard-output
new file mode 100644
index 0000000..d890eb0
--- /dev/null
+++ b/testsuite/dd/dd-copies-from-standard-input-to-standard-output
@@ -0,0 +1 @@
+test "$(echo I WANT | busybox dd 2>/dev/null)" = "I WANT"
diff --git a/testsuite/dd/dd-prints-count-to-standard-error b/testsuite/dd/dd-prints-count-to-standard-error
new file mode 100644
index 0000000..2187dc0
--- /dev/null
+++ b/testsuite/dd/dd-prints-count-to-standard-error
@@ -0,0 +1,2 @@
+echo I WANT | busybox dd of=foo >/dev/null 2>bar
+grep -q records bar
diff --git a/testsuite/dd/dd-reports-write-errors b/testsuite/dd/dd-reports-write-errors
new file mode 100644
index 0000000..4920600
--- /dev/null
+++ b/testsuite/dd/dd-reports-write-errors
@@ -0,0 +1,2 @@
+busybox dd if="$0" of=/dev/full 2>/dev/null || status=$?
+test $status = 1