File: 03.read.string.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 (17 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use Config::Tiny;

use Test::More tests => 2;

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

my($string) = <<'EOS';
param1=One
param2=Two
EOS

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

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