More quoting tests
This commit is contained in:
parent
7cfdc2b20d
commit
bb11d94bd8
1 changed files with 12 additions and 1 deletions
13
t/prompt.t
13
t/prompt.t
|
@ -34,13 +34,23 @@ are '"foo"', [qw/foo/];
|
|||
|
||||
are "foo bar", [qw/foo bar/];
|
||||
are "foo bar baz", [qw/foo bar baz/];
|
||||
are "'foo' 'bar' 'baz'", [qw/foo bar baz/];
|
||||
are "'foo' 'bar' \"baz\"", [qw/foo bar baz/];
|
||||
|
||||
are "foo;bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo ;bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo; bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo ; bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
|
||||
are "'foo';bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "'foo' ;bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "'foo'; bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "'foo' ; bar", ['foo', "\0SEPARATOR", 'bar'];
|
||||
|
||||
are "foo;'bar'", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo ;'bar'", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo; 'bar'", ['foo', "\0SEPARATOR", 'bar'];
|
||||
are "foo ; 'bar'", ['foo', "\0SEPARATOR", 'bar'];
|
||||
|
||||
are "foo\\;bar", [qw/foo;bar/];
|
||||
are "foo \\;bar", [qw/foo ;bar/];
|
||||
are "foo\\; bar", [qw/foo; bar/];
|
||||
|
@ -58,6 +68,7 @@ are 'foo\\\\\\\\bar', ["foo\\\\bar"];
|
|||
|
||||
are "abort", ["\0ABORT"];
|
||||
are "'abort'", [qw/abort/];
|
||||
are '"abort"', [qw/abort/];
|
||||
|
||||
are "\\", 0;
|
||||
are "'foo", 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue