From 2b2f7fd0b09f19684217970be9826bbb5ccd4acf Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Wed, 1 Jan 2025 05:12:05 -0700 Subject: [PATCH 1/2] self host --- README.md | 1 + dist.ini | 4 ++++ lib/Test/SpellCheck.pm | 1 + spellcheck.ini | 3 +++ xt/author/spellcheck.t | 6 ++++++ 5 files changed, 15 insertions(+) create mode 100644 xt/author/spellcheck.t diff --git a/README.md b/README.md index 5138a49..710e8aa 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Check spelling of POD and other documents ```perl use Test2::V0; +use Test::SpellCheck; spell_check 'lib/**/*.pm'; diff --git a/dist.ini b/dist.ini index d2514c5..da6e401 100644 --- a/dist.ini +++ b/dist.ini @@ -31,3 +31,7 @@ id = develop-only begin = develop-only-begin end = develop-only-end remove = 1 + +[PruneFiles] +filename = xt/author/pod_spelling_common.t +filename = xt/author/pod_spelling_system.t diff --git a/lib/Test/SpellCheck.pm b/lib/Test/SpellCheck.pm index 72aa5b2..31b3dfa 100644 --- a/lib/Test/SpellCheck.pm +++ b/lib/Test/SpellCheck.pm @@ -22,6 +22,7 @@ our @EXPORT = qw ( spell_check spell_check_ini ); =head1 SYNOPSIS use Test2::V0; + use Test::SpellCheck; spell_check 'lib/**/*.pm'; diff --git a/spellcheck.ini b/spellcheck.ini index f2d0480..072146b 100644 --- a/spellcheck.ini +++ b/spellcheck.ini @@ -3,5 +3,8 @@ word = yy word = wb word = spellcheck.ini +word = cpu +word = splitter [Dictionary] dictionary = spellcheck.dic + diff --git a/xt/author/spellcheck.t b/xt/author/spellcheck.t new file mode 100644 index 0000000..84b7de4 --- /dev/null +++ b/xt/author/spellcheck.t @@ -0,0 +1,6 @@ +use Test2::V0; +use Test::SpellCheck; + +spell_check_ini; + +done_testing; From 37c2cc54c6aae2f4fd790020c9dac38a763c3665 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Wed, 1 Jan 2025 05:16:33 -0700 Subject: [PATCH 2/2] only if installed --- xt/author/spellcheck.t | 1 + 1 file changed, 1 insertion(+) diff --git a/xt/author/spellcheck.t b/xt/author/spellcheck.t index 84b7de4..75bddc2 100644 --- a/xt/author/spellcheck.t +++ b/xt/author/spellcheck.t @@ -1,4 +1,5 @@ use Test2::V0; +use Test2::Require::Module 'Test::SpellCheck'; use Test::SpellCheck; spell_check_ini;