aboutsummaryrefslogtreecommitdiff
path: root/testsuite/cut.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/cut.tests')
-rwxr-xr-xtestsuite/cut.tests26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/cut.tests b/testsuite/cut.tests
index ba5f88d60..8da390cd7 100755
--- a/testsuite/cut.tests
+++ b/testsuite/cut.tests
@@ -116,4 +116,30 @@ testing "cut non-existing field" "cut -d ':' -f1,3" \
116 "1\n" \ 116 "1\n" \
117 "" "1:\n" 117 "" "1:\n"
118 118
119# cut -d$'\n' has a special meaning: "select input lines".
120# I didn't find any documentation for this feature.
121testing "cut -dNEWLINE" \
122 "cut -d'
123' -f4,2,6-8" \
124 "2\n4\n6\n7\n" \
125 "" "1\n2\n3\n4\n5\n6\n7"
126
127testing "cut -dNEWLINE --output-delimiter" \
128 "cut -d'
129' -O@@ -f4,2,6-8" \
130 "2@@4@@6@@7\n" \
131 "" "1\n2\n3\n4\n5\n6\n7"
132
133testing "cut -dNEWLINE --output-delimiter 2" \
134 "cut -d'
135' -O@@ -f4,2,6-8" \
136 "2@@4@@6@@7\n" \
137 "" "1\n2\n3\n4\n5\n6\n7\n"
138
139testing "cut -dNEWLINE --output-delimiter EMPTY_INPUT" \
140 "cut -d'
141' -O@@ -f4,2,6-8" \
142 "" \
143 "" ""
144
119exit $FAILCOUNT 145exit $FAILCOUNT