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

Commit

Permalink
Merge branch 'cmd-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
majuscule committed Feb 18, 2013
2 parents 941e38b + 722333b commit 1de0eb9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist.ini
Expand Up @@ -65,6 +65,9 @@ Test::More = 0.98
Test::LoadAllModules = 0.021 Test::LoadAllModules = 0.021
File::Temp = 0.22 File::Temp = 0.22
Test::Script::Run = 0.05 Test::Script::Run = 0.05
File::chdir = 0.1008
Dir::Self = 0.10
File::FindLib = 0.001001


[UploadToDuckPAN] [UploadToDuckPAN]


Expand Down
11 changes: 11 additions & 0 deletions t/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/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;
36 changes: 36 additions & 0 deletions t/system_duckpan_query.t
@@ -0,0 +1,36 @@
#!/usr/bin/perl

use strict;
use warnings;
use Test::More;
use Test::Expect;
use Test::Script::Run;
use File::chdir;
use Dir::Self;
use File::FindLib '../lib';

use Data::Dumper;

my $query = join ' ', Test::Script::Run::get_perl_cmd('duckpan', 'query');

chdir(__DIR__);

expect_run(
command => $query,
prompt => 'Query: ',
quit => '',
);

expect_run(
command => "$query Goodie::TwoShoes",
prompt => 'Query: ',
quit => '',
);

expect_run(
command => "$query Spice::NagaBhutJolokiaDax",
prompt => 'Query: ',
quit => '',
);

done_testing;

0 comments on commit 1de0eb9

Please sign in to comment.