File: 2_error.t

package info (click to toggle)
libconfig-properties-perl 1.80-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 479; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 526 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
20
21
22
23
24
25
26
27
28
29
30
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 1.t'

use Test::More tests => 2;
BEGIN { use_ok('Config::Properties') };

my $cfg=Config::Properties->new();

eval {
    $cfg->load(\*DATA)
};

like ($@, qr/line\s6\b/, "error at line 6 is ok");



__DATA__
# hello
foo=one
    Bar : maybe one\none\tone\r
eq\=ua\:l jamon

this_is_an_error\=line

more : another \
    configuration \
    line
less= who said:\tless ??? 

cra\n\=\:\ \\z'y' jump