1#!/usr/bin/perl 2# 3# Test Pod::Text::Termcap behavior with various snippets. 4# 5# Copyright 2002, 2004, 2006, 2009, 2012-2014, 2018 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 11use 5.006; 12use strict; 13use warnings; 14 15use lib 't/lib'; 16 17use Test::More tests => 11; 18use Test::Podlators qw(test_snippet); 19 20# Load the module. 21BEGIN { 22 use_ok('Pod::Text::Termcap'); 23} 24 25# Hard-code a few values to try to get reproducible results. 26$ENV{COLUMNS} = 80; 27$ENV{TERM} = 'xterm'; 28$ENV{TERMPATH} = File::Spec->catfile('t', 'data', 'termcap'); 29$ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\E[1m:us=\E[4m:me=\E[m'; 30 31# List of snippets run by this test. 32my @snippets = qw(escape-wrapping tag-width tag-wrapping width wrapping); 33 34# Run all the tests. 35for my $snippet (@snippets) { 36 test_snippet('Pod::Text::Termcap', "termcap/$snippet"); 37} 38