This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
package DDG::Goodie::TwoShoes; | |||
|
|||
use DDG::Goodie; | |||
|
|||
triggers start => //; | |||
|
|||
handle remainder => sub { | |||
return; | |||
}; | |||
|
|||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,12 @@ | |||
package DDG::Spice::NagaBhutJolokiaDax; | |||
|
|||
use DDG::Spice; | |||
|
|||
triggers start => //; | |||
spice to => //; | |||
|
|||
handle remainder => sub { | |||
return; | |||
}; | |||
|
|||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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; |