diff options
Diffstat (limited to 'testsuite/cut.tests')
-rwxr-xr-x | testsuite/cut.tests | 26 |
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. | ||
121 | testing "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 | |||
127 | testing "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 | |||
133 | testing "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 | |||
139 | testing "cut -dNEWLINE --output-delimiter EMPTY_INPUT" \ | ||
140 | "cut -d' | ||
141 | ' -O@@ -f4,2,6-8" \ | ||
142 | "" \ | ||
143 | "" "" | ||
144 | |||
119 | exit $FAILCOUNT | 145 | exit $FAILCOUNT |