diff options
author | Russ Allbery <rra@cpan.org> | 2021-03-27 22:18:18 -0700 |
---|---|---|
committer | Russ Allbery <rra@cpan.org> | 2021-03-27 22:18:18 -0700 |
commit | ad6f0eb0c6aaf89d4aecae7918126180ebd9d771 (patch) | |
tree | dd48b643b79ceead596628ae3e94a1ca4d142e70 | |
parent | b0f301ad29f43370c885e9c968152936c8d2d6e3 (diff) |
Add test for Changes file format
Use Test::CPAN::Changes to check the format of the Changes file.
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | cpanfile | 1 | ||||
-rw-r--r-- | docs/docknot.yaml | 1 | ||||
-rwxr-xr-x | t/docs/changes.t | 47 |
6 files changed, 52 insertions, 1 deletions
@@ -1,6 +1,6 @@ Revision history for DocKnot -4.02 - not released +4.02 - Not Released - Support setting distribution.packaging.debian.package along with distribution.packaging.debian.personal to specify the package name. Do @@ -98,6 +98,7 @@ TESTING * Devel::Cover * Perl::Critic::Freenode + * Test::CPAN::Changes (part of CPAN-Changes) * Test::MinimumVersion * Test::Perl::Critic * Test::Pod @@ -110,6 +110,7 @@ suite if present: * Devel::Cover * Perl::Critic::Freenode +* Test::CPAN::Changes (part of CPAN-Changes) * Test::MinimumVersion * Test::Perl::Critic * Test::Pod @@ -18,6 +18,7 @@ on 'test' => sub { requires 'File::Copy::Recursive'; suggests 'Devel::Cover'; suggests 'Perl::Critic::Freenode'; + suggests 'Test::CPAN::Changes'; suggests 'Test::MinimumVersion'; suggests 'Test::Perl::Critic'; suggests 'Test::Pod'; diff --git a/docs/docknot.yaml b/docs/docknot.yaml index c35907f..aef5127 100644 --- a/docs/docknot.yaml +++ b/docs/docknot.yaml @@ -135,6 +135,7 @@ test: * Devel::Cover * Perl::Critic::Freenode + * Test::CPAN::Changes (part of CPAN-Changes) * Test::MinimumVersion * Test::Perl::Critic * Test::Pod diff --git a/t/docs/changes.t b/t/docs/changes.t new file mode 100755 index 0000000..16bf212 --- /dev/null +++ b/t/docs/changes.t @@ -0,0 +1,47 @@ +#!/usr/bin/perl +# +# Check Changes file for compliance with CPAN::Changes::Spec. +# +# The canonical version of this file is maintained in the rra-c-util package, +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. +# +# Copyright 2021 Russ Allbery <eagle@eyrie.org> +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT + +use 5.008; +use strict; +use warnings; + +use lib 't/lib'; + +use Test::RRA qw(skip_unless_automated use_prereq); + +use Test::More; + +# Skip this test for normal user installs. +skip_unless_automated('Changes format tests'); + +# Load prerequisite modules. +use_prereq('Test::CPAN::Changes'); + +# Run the tests. +changes_ok(); |