From: alexander_bluhm@genua.de (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.5.HEAD-32013-
1163784707-1469.40921-75-0@perl.org>
(and convert the example to a test)
p4raw-id: //depot/perl@29316
Carp::carp("Unmatched single quote: $_");
return();
}
- elsif (s/\A\\(.)//s) {
+ elsif (s/\A\\(.?)//s) {
$snippet = $1;
}
elsif (s/\A([^\s\\'"]+)//) {
use warnings;
use Text::ParseWords;
-use Test::More tests => 26;
+use Test::More tests => 27;
@words = shellwords(qq(foo "bar quiz" zoo));
is($words[0], 'foo');
# from parse_line, so it's behavior is more like /bin/sh
$result = join('|', shellwords(" aa \\ \\ bb ", " \\ ", "cc dd ee\\ "));
is($result, "aa| | bb| |cc|dd|ee ");
+
+$SIG{ALRM} = sub {die "Timeout!"};
+alarm(3);
+@words = Text::ParseWords::old_shellwords("foo\\");
+is(@words, 1);
+alarm(0);