Skip to content

Commit

Permalink
More quoting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Juerd committed Dec 28, 2023
1 parent 7cfdc2b commit bb11d94
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/prompt.t
Original file line number Diff line number Diff line change
Expand Up @@ -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/];
Expand All @@ -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;
Expand Down

0 comments on commit bb11d94

Please sign in to comment.