File: msgfmt.t

package info (click to toggle)
libdist-zilla-plugin-localemsgfmt-perl 1.203-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 146; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 965 bytes parent folder | download | duplicates (2)
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
#!perl

use strict;
use warnings;

use Dist::Zilla     1.093250;
use Dist::Zilla::Tester;
use Path::Class;
use Test::File;
use Test::More      tests => 8;
use Test::Warn;

# build fake repository
my $tzil = Dist::Zilla::Tester->from_config({
  dist_root => dir( qw{ t msgfmt } ),
});

warning_like { $tzil->build } qr/^Skipping invalid path:/, "invalid path gives warning";

my $share = $tzil->root->child( "share" );
file_exists_ok( $share->child( "locale1", "basic.mo" ), "1st dir" );
file_exists_ok( $share->child( "locale2", "basic.mo" ), "2nd dir" );

# recursive
file_exists_ok( $share->child( "locale1", "a", "a", "basic.mo" ), "recurse" );
file_exists_ok( $share->child( "locale1", "a", "b", "basic.mo" ), "recurse" );
file_exists_ok( $share->child( "locale1", "b", "a", "basic.mo" ), "recurse" );
file_exists_ok( $share->child( "locale1", "b", "b", "basic.mo" ), "recurse" );
file_exists_ok( $share->child( "locale1", "b",      "basic.mo" ), "recurse" );