blob: 47a75881dc76f7c31bba15be27ce3d41e3d3813e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!./perl
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
print "1..4\n";
use Text::ParseWords;
@words = shellwords(qq(foo "bar quiz" zoo));
#print join(";", @words), "\n";
print "not " if $words[0] ne 'foo';
print "ok 1\n";
print "not " if $words[1] ne 'bar quiz';
print "ok 2\n";
print "not " if $words[2] ne 'zoo';
print "ok 3\n";
# Test quotewords() with other parameters
@words = quotewords(":+", 1, qq(foo:::"bar:foo":zoo zoo:));
#print join(";", @words), "\n";
print "not " unless join(";", @words) eq qq(foo;"bar:foo";zoo zoo);
print "ok 4\n";
|