File: 06.repeat.key.t

package info (click to toggle)
libconfig-tiny-perl 2.30-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 208 kB
  • sloc: perl: 394; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 422 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
#!/usr/bin/perl

use Config::Tiny;

use Test::More tests => 3;

# ------------------------

my($string) = <<'EOS';
key1=One
key2=Infix
key1=Two
EOS

my($config) = Config::Tiny -> read_string($string);

isa_ok($config, 'Config::Tiny', 'read_string() returns an object');
ok($$config{_}{key1} eq 'Two', 'Access to hashref returns correct value');
ok($$config{_}{key2} eq 'Infix', 'Access to hashref returns correct value');