Sub-Multi-Tiny

 view release on metacpan or  search on metacpan

t/10_lexer.t  view on Meta::CPAN


# For tests we expect will die.  Returns ($ty, $val) if it succeeds.
sub FirstToken {
    my (undef, undef, $line) = caller;
    my ($text, $lrExpected) = @_;
    my $parser = FakeYappParser->new($text);
    return Sub::Multi::Tiny::SigParse::_next_token($parser);
} #FirstToken()

# Make a hashref representing a parameter
sub _p($$$) {
    +{ name=>$_[0], named=>!!$_[1], reqd=>!!$_[2] }
}

# --- Success tests ---------------------------------------------------

# Empty, or WS-only
CheckSuccess('', [['', '<undef>']]);
CheckSuccess(' ', [['', '<undef>']]);
CheckSuccess("\t", [['', '<undef>']]);
CheckSuccess("\n", [['', '<undef>']]);



( run in 0.532 second using v1.01-cache-2.11-cpan-524268b4103 )