xref: /openbsd-src/gnu/usr.bin/perl/cpan/podlators/t/man/snippets.t (revision f2a19305cfc49ea4d1a5feb55cd6c283c6f1e031)
1#!/usr/bin/perl
2#
3# Test Pod::Man behavior with various snippets.
4#
5# Copyright 2002, 2004, 2006, 2008-2009, 2012-2013, 2015-2016, 2018-2020, 2022
6#     Russ Allbery <rra@cpan.org>
7#
8# This program is free software; you may redistribute it and/or modify it
9# under the same terms as Perl itself.
10#
11# SPDX-License-Identifier: GPL-1.0-or-later OR Artistic-1.0-Perl
12
13use 5.008;
14use strict;
15use warnings;
16
17use lib 't/lib';
18
19use Test::More tests => 113;
20use Test::Podlators qw(test_snippet);
21
22# Load the module.
23BEGIN {
24    use_ok('Pod::Man');
25}
26
27# List of snippets run by this test.
28my @snippets = qw(
29    agrave backslash-man-ref bullet-after-nonbullet bullets c-in-header
30    c-in-name dollar-magic error-die error-none error-normal error-pod
31    error-stderr error-stderr-opt eth fixed-font fixed-font-in-item for-blocks
32    guesswork guesswork-all guesswork-no-quoting guesswork-none
33    guesswork-partial guesswork-quoting hyphen-in-s item-fonts language
34    link-quoting link-to-url long-quote lquote-and-quote lquote-rquote
35    markup-in-name multiline-x naive naive-groff name-guesswork name-quotes
36    name-quotes-none nested-lists newlines-in-c non-ascii nonbreaking-space-l
37    not-bullet not-numbers nourls periods quote-escaping rquote-none
38    soft-hyphens trailing-space true-false x-whitespace x-whitespace-entry
39    zero-width-space
40);
41
42# Run all the tests.
43for my $snippet (@snippets) {
44    test_snippet('Pod::Man', "man/$snippet");
45}
46