Skip to content

Commit

Permalink
Revert "Add tests for whitespace-delimited CLI arguments"
Browse files Browse the repository at this point in the history
This reverts commit c67cb2d, which
was intended to be a PR rather than a push to master.  Sorry for the
log clutter.
  • Loading branch information
codesections committed Feb 19, 2021
1 parent c67cb2d commit 81aa4db
Showing 1 changed file with 25 additions and 30 deletions.
55 changes: 25 additions & 30 deletions S06-other/main-usage.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add("packages/Test-Helpers");
use Test::Util;

plan 48;
plan 43;

# Basic functionality

Expand Down Expand Up @@ -133,35 +133,30 @@ subtest 'Extra arg with newline value' => {
# Spacey options may be removed from core spec; for now, moving to end of tests
# (discussion starts at http://irclog.perlgeek.de/perl6/2011-10-17#i_4578353 )

is_run 'sub MAIN(Any :$x) { print $x }', {:status<2>}, :args<--x 23>,
'short option with optional argument rejects spacey value';

is_run 'sub MAIN(Str :$x) { print $x }', {:out<23>}, :args<--x 23>,
'short option with required argument accepts spacey value';

is_run 'sub MAIN(Any :xen(:$x)) { print $x }', {:status<2>}, :args<--xen 23>,
'long option with optional argument rejects spacey value';

is_run 'sub MAIN(Str :xen(:$x)) { print $x }', {:out<23>}, :args<--xen 23>,
'long option with required argument accepts spacey value';

is_run 'sub MAIN(Any :xen(:$xin)) { print $xin }', {:status<2>}, :args<--xin 23>,
'named alias (inner name) with optional argument rejects spacey value';

is_run 'sub MAIN(Str :xen(:$xin)) { print $xin }', {:out<23>}, :args<--xin 23>,
'named alias (inner name) with required argument accepts spacey value';

is_run 'sub MAIN(Any :xen(:$xin)) { print $xin }', {:status<2>}, :args<--xen 23>,
'named alias (outer name) with optional argument rejects spacey value';

is_run 'sub MAIN(Str :xen(:$xin)) { print $xin }', {:out<23>}, :args<--xen 23>,
'named alias (outer name) with required argument accepts spacey value';

is_run 'sub MAIN(Any :xen(:$x)) { print $x }', {:status<2>}, :args<-x 23>,
'named alias (short option) with optional argument rejects spacey value';

is_run 'sub MAIN(Str :xen(:$x)) { print $x }', {:out<23>}, :args<-x 23>,
'named alias (short option) with required argument accepts spacey value';
# https://github.com/Raku/old-issue-tracker/issues/3949
#?rakudo todo 'nom regression'
is_run 'sub MAIN(:$x) { print $x }', {:out<23>}, :args<--x 23>,
'option with spacey value';

# https://github.com/Raku/old-issue-tracker/issues/3949
#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$x)) { print $x }', {:out<23>}, :args<--xen 23>,
'long option with spacey value';

# https://github.com/Raku/old-issue-tracker/issues/3949
#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$xin)) { print $xin }', {:out<23>}, :args<--xin 23>,
'named alias (inner name) with spacey value';

# https://github.com/Raku/old-issue-tracker/issues/3949
#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$xin)) { print $xin }', {:out<23>}, :args<--xen 23>,
'named alias (outer name) with spacey value';

# https://github.com/Raku/old-issue-tracker/issues/3949
#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$x)) { print $x }', {:out<23>}, :args<-x 23>,
'short option with spacey value';

is_run 'subset Command of Str where "run";
multi MAIN(Command $c) { print 1 },
Expand Down

0 comments on commit 81aa4db

Please sign in to comment.