File: man_pagename.t

package info (click to toggle)
libextutils-helpers-perl 0.028-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144 kB
  • sloc: perl: 430; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings FATAL => 'all';
use Test::More tests => 4;
use Config;
use File::Spec::Functions qw/catfile/;
use ExtUtils::Helpers qw/man1_pagename man3_pagename/;

my %separator = (
	MSWin32 => '.',
	VMS => '__',
	os2 => '.',
	cygwin => '.',
);
my $sep = $separator{$^O} || '::';

is man1_pagename('script/foo'), "foo.$Config{man1ext}", 'man1_pagename';

is man3_pagename(catfile(qw/lib ExtUtils.pm/)), "ExtUtils.$Config{man3ext}", 'man3_pagename 1';
is man3_pagename(catfile(qw/lib ExtUtils Helpers.pm/)), join($sep, qw/ExtUtils Helpers./).$Config{man3ext}, 'man3_pagename 2';
is man3_pagename(catfile(qw/lib ExtUtils Helpers Unix.pm/)), join($sep, qw/ExtUtils Helpers Unix./).$Config{man3ext}, 'man3_pagename 3';