[libdist-zilla-plugin-test-podspelling-perl] 77/86: Test that an invalid word causes a failure
Axel Beckert
abe at deuxchevaux.org
Mon May 25 10:02:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to annotated tag 2.001001
in repository libdist-zilla-plugin-test-podspelling-perl.
commit a0018802e9682ad801b6ce5096fafe12df7a82d4
Author: Randy Stauner <randy at magnificent-tears.com>
Date: Tue Sep 6 07:45:13 2011 -0700
Test that an invalid word causes a failure
---
corpus/foo/bin/foo | 2 ++
t/checked.t | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/corpus/foo/bin/foo b/corpus/foo/bin/foo
index 5ebc854..af0c237 100644
--- a/corpus/foo/bin/foo
+++ b/corpus/foo/bin/foo
@@ -6,4 +6,6 @@ print "foo\n";
Prints "foo".
+bigfatspellingerrorajoidufhlsidufmahiefmhregrge
+
=cut
diff --git a/t/checked.t b/t/checked.t
index 3e95647..90b6256 100644
--- a/t/checked.t
+++ b/t/checked.t
@@ -9,12 +9,13 @@ use Path::Class;
use Cwd ();
# lib/ and bin/
-spell_check_dist( foo => file(qw(bin foo)), file(qw(lib Foo.pm)) );
+spell_check_dist( foo => [file(qw(bin foo)) => {ok => 0}], file(qw(lib Foo.pm)) );
# just lib/
spell_check_dist( nobin => file(qw(lib Foo.pm)) );
done_testing;
+# @files should be a file (name) or an array ref of [file, hash-to-override-expected-results]
sub spell_check_dist {
my ($dir, @files) = @_;
my $tzil = Dist::Zilla::Tester->from_config({
@@ -40,11 +41,13 @@ sub spell_check_dist {
map {
+{
ok => 1,
- name => 'POD spelling for ' . $_,
+ name => 'POD spelling for ' . $_->[0],
# depth: starts at 1; +1 for do-file; +1 for the all_ func
depth => 3,
+ %{ $_->[1] },
},
}
+ map { ref $_ eq 'ARRAY' ? $_ : [$_ => {}] }
@files
],
"spell check pod for $dir"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugin-test-podspelling-perl.git
More information about the Pkg-perl-cvs-commits
mailing list