Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
added expect tests for duckpan query
Browse files Browse the repository at this point in the history
  • Loading branch information
majuscule committed Feb 18, 2013
1 parent 7a1ff5e commit 6442495
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
26 changes: 26 additions & 0 deletions t/01-cmds.t
@@ -0,0 +1,26 @@
#!/usr/bin/perl

use strict;
use warnings;
use Test::More;
use Test::Expect;

expect_run(
command => "cd t/test_dist && ../../bin/duckpan query",
prompt => 'Query: ',
quit => '',
);

expect_run(
command => "cd t/test_dist && ../../bin/duckpan query Goodie::TwoShoes",
prompt => 'Query: ',
quit => '',
);

expect_run(
command => "cd t/test_dist && ../../bin/duckpan query Spice::NagaBhutJolokiaDax",
prompt => 'Query: ',
quit => '',
);

done_testing;
11 changes: 11 additions & 0 deletions t/test_dist/lib/DDG/Goodie/TwoShoes.pm
@@ -0,0 +1,11 @@
package DDG::Goodie::TwoShoes;

use DDG::Goodie;

triggers start => //;

handle remainder => sub {
return;
};

1;
12 changes: 12 additions & 0 deletions t/test_dist/lib/DDG/Spice/NagaBhutJolokiaDax.pm
@@ -0,0 +1,12 @@
package DDG::Spice::NagaBhutJolokiaDax;

use DDG::Spice;

triggers start => //;
spice to => //;

handle remainder => sub {
return;
};

1;

0 comments on commit 6442495

Please sign in to comment.