File: v2_03_read.t

package info (click to toggle)
libparse-plainconfig-perl 3.07-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 1,916; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (5)
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 -T
# 03_read.t

use Test::More tests => 3;
use Paranoid;
use Parse::PlainConfig::Legacy;

use strict;
use warnings;

psecureEnv();

my $testrc = "./t/v2_testrc";
my $conf   = new Parse::PlainConfig::Legacy;
my @p;

ok( !$conf->read( "${testrc}-1" ), 'read 1' );
ok( $conf->read( $testrc ), 'read 2' );
@p = $conf->parameters;
is( scalar( grep( /^SCALAR 1$/, @p ) ), 1, 'check parameters' );

# end 03_read.t