Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Die if the target is not recognized
- Loading branch information
Showing
4 changed files
with
14 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
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 | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| use strict; | ||
| use warnings; | ||
| use File::Spec::Functions 'catfile'; | ||
| use Test::More tests => 1; | ||
|
|
||
| # grok should die with an error message if the target is not recognized | ||
| my $grok = catfile('script', 'grok'); | ||
|
|
||
| my $target = 'definitely_completely_unrecognized_target'; | ||
| my $result = qx/$^X $grok $target 2>&1/; | ||
| like($result, qr/^Target '$target' not recognized$/, "Sane error message"); |