aboutsummaryrefslogtreecommitdiff
path: root/testsuite/cut
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/cut')
-rw-r--r--testsuite/cut/cut-cuts-a-character1
-rw-r--r--testsuite/cut/cut-cuts-a-closed-range1
-rw-r--r--testsuite/cut/cut-cuts-a-field1
-rw-r--r--testsuite/cut/cut-cuts-an-open-range1
-rw-r--r--testsuite/cut/cut-cuts-an-unclosed-range1
5 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/cut/cut-cuts-a-character b/testsuite/cut/cut-cuts-a-character
new file mode 100644
index 000000000..d6c5efa3a
--- /dev/null
+++ b/testsuite/cut/cut-cuts-a-character
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 3) = c
diff --git a/testsuite/cut/cut-cuts-a-closed-range b/testsuite/cut/cut-cuts-a-closed-range
new file mode 100644
index 000000000..9680b7650
--- /dev/null
+++ b/testsuite/cut/cut-cuts-a-closed-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 1-2) = ab
diff --git a/testsuite/cut/cut-cuts-a-field b/testsuite/cut/cut-cuts-a-field
new file mode 100644
index 000000000..4c7f44007
--- /dev/null
+++ b/testsuite/cut/cut-cuts-a-field
@@ -0,0 +1 @@
+test $(echo -e "f1\tf2\tf3" | busybox cut -f 2) = f2
diff --git a/testsuite/cut/cut-cuts-an-open-range b/testsuite/cut/cut-cuts-an-open-range
new file mode 100644
index 000000000..1fbf27742
--- /dev/null
+++ b/testsuite/cut/cut-cuts-an-open-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c -3) = abc
diff --git a/testsuite/cut/cut-cuts-an-unclosed-range b/testsuite/cut/cut-cuts-an-unclosed-range
new file mode 100644
index 000000000..a2b0cdb03
--- /dev/null
+++ b/testsuite/cut/cut-cuts-an-unclosed-range
@@ -0,0 +1 @@
+test $(echo abcd | busybox cut -c 3-) = cd