File: 01-hints.t

package info (click to toggle)
libdevel-patchperl-perl 2.08-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 748 kB
  • sloc: perl: 7,948; ansic: 46; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 964 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use warnings;
use Test::More qw[no_plan];
use Devel::PatchPerl::Hints qw[hint_file hints];

{
  my $content = hint_file('freebsd');
  ok( $content, 'We got content' );
  like( $content, qr/Anton/si, 'Reasonable' );
}

{
  my ($file,$content) = hint_file('freebsd');
  ok( $content, 'We got content' );
  like( $content, qr/Anton/si, 'Reasonable' );
  is( $file, 'freebsd.sh', 'Hints file name okay' );
}

{
  my $content = Devel::PatchPerl::Hints->hint_file('freebsd');
  ok( $content, 'We got content' );
  like( $content, qr/Anton/si, 'Reasonable' );
}

{
  my ($file,$content) = Devel::PatchPerl::Hints->hint_file('freebsd');
  ok( $content, 'We got content' );
  like( $content, qr/Anton/si, 'Reasonable' );
  is( $file, 'freebsd.sh', 'Hints file name okay' );
}

{
  ok( $_, 'We got content' ) for map { scalar hint_file( $_ ) } qw(freebsd netbsd linux darwin hpux);
}

{
  ok( $_, 'We got content' ) for map { scalar hint_file( $_ ) } hints();
}