aboutsummaryrefslogtreecommitdiff
path: root/testsuite/wc
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2015-05-15 10:20:47 +0200
committerBjørn Mork <bjorn@mork.no>2015-05-15 10:20:47 +0200
commit73b16af8feec390afbabd9356d6e5e83c0390838 (patch)
tree3730020ba2f9caeb9d7815a975af51830b51ce11 /testsuite/wc
busybox: imported from http://www.busybox.net/downloads/busybox-1.13.3.tar.bz2busybox-1.13.3
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'testsuite/wc')
-rw-r--r--testsuite/wc/wc-counts-all2
-rw-r--r--testsuite/wc/wc-counts-characters1
-rw-r--r--testsuite/wc/wc-counts-lines1
-rw-r--r--testsuite/wc/wc-counts-words1
-rw-r--r--testsuite/wc/wc-prints-longest-line-length1
5 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/wc/wc-counts-all b/testsuite/wc/wc-counts-all
new file mode 100644
index 0000000..7083645
--- /dev/null
+++ b/testsuite/wc/wc-counts-all
@@ -0,0 +1,2 @@
+# 1 line, 4 words, 20 chars.
+test "`echo i\'m a little teapot | busybox wc | sed 's/ */ /g' | sed 's/^ //'`" = '1 4 20'
diff --git a/testsuite/wc/wc-counts-characters b/testsuite/wc/wc-counts-characters
new file mode 100644
index 0000000..7558646
--- /dev/null
+++ b/testsuite/wc/wc-counts-characters
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -c` -eq 20
diff --git a/testsuite/wc/wc-counts-lines b/testsuite/wc/wc-counts-lines
new file mode 100644
index 0000000..5be6ed0
--- /dev/null
+++ b/testsuite/wc/wc-counts-lines
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -l` -eq 1
diff --git a/testsuite/wc/wc-counts-words b/testsuite/wc/wc-counts-words
new file mode 100644
index 0000000..331650e
--- /dev/null
+++ b/testsuite/wc/wc-counts-words
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -w` -eq 4
diff --git a/testsuite/wc/wc-prints-longest-line-length b/testsuite/wc/wc-prints-longest-line-length
new file mode 100644
index 0000000..78831fc
--- /dev/null
+++ b/testsuite/wc/wc-prints-longest-line-length
@@ -0,0 +1 @@
+test `echo i\'m a little teapot | busybox wc -L` -eq 19