summaryrefslogtreecommitdiff
path: root/t/lib/parsewords.t
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/parsewords.t')
-rwxr-xr-xt/lib/parsewords.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/t/lib/parsewords.t b/t/lib/parsewords.t
index 90791790ab..86323b6fc6 100755
--- a/t/lib/parsewords.t
+++ b/t/lib/parsewords.t
@@ -2,12 +2,12 @@
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
+ unshift @INC, '../lib';
}
use Text::ParseWords;
-print "1..17\n";
+print "1..18\n";
@words = shellwords(qq(foo "bar quiz" zoo));
print "not " if $words[0] ne 'foo';
@@ -101,3 +101,8 @@ $string = 'aaaa"bbbbb" cc\ cc \\\\\"dddd\' eee\\\\\"\\\'ffff\' gg';
$result = join('|', parse_line('\s+', 0, $string));
print "not " unless $result eq 'aaaabbbbb|cc cc|\"dddd eee\\\\"\'ffff|gg';
print "ok 17\n";
+
+# test whitespace in the delimiters
+@words = quotewords(' ', 1, '4 3 2 1 0');
+print "not " unless join(";", @words) eq qq(4;3;2;1;0);
+print "ok 18\n";