Skip to content

Commit

Permalink
improve stub for [gets]
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Jun 27, 2010
1 parent 6bb906f commit e30aae6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Partcl/commands/main.pm
Expand Up @@ -272,6 +272,10 @@ our sub format(*@args) {
}

our sub gets(*@args) {
if +@args < 1 || +@args > 2 {
error('wrong # args: should be "gets channelId ?varName?"');
}
my $channelId := @args.shift;
'';
}

Expand Down
4 changes: 2 additions & 2 deletions t/cmd_gets.t
Expand Up @@ -5,11 +5,11 @@ plan 3

eval_is {gets} \
{wrong # args: should be "gets channelId ?varName?"} \
{no args} {TODO NQPRX}
{no args}

eval_is {gets a b c} \
{wrong # args: should be "gets channelId ?varName?"} \
{too many args} {TODO NQPRX}
{too many args}

eval_is {gets #parrot} \
{can not find channel named "#parrot"} \
Expand Down

0 comments on commit e30aae6

Please sign in to comment.