This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
filecopy.t #3 fails on dos-djgpp
[perl5.git] / t / lib / parsewords.t
CommitLineData
1a3850a5
GA
1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
5 @INC = '../lib';
6}
7
8print "1..4\n";
9
10use Text::ParseWords;
11
12@words = shellwords(qq(foo "bar quiz" zoo));
13#print join(";", @words), "\n";
14
15print "not " if $words[0] ne 'foo';
16print "ok 1\n";
17
18print "not " if $words[1] ne 'bar quiz';
19print "ok 2\n";
20
21print "not " if $words[2] ne 'zoo';
22print "ok 3\n";
23
24# Test quotewords() with other parameters
25@words = quotewords(":+", 1, qq(foo:::"bar:foo":zoo zoo:));
26#print join(";", @words), "\n";
27print "not " unless join(";", @words) eq qq(foo;"bar:foo";zoo zoo);
28print "ok 4\n";