File: 20-_parse_libs.t

package info (click to toggle)
libmodule-scandeps-perl 1.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 628 kB
  • sloc: perl: 3,157; makefile: 8; ansic: 1
file content (39 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;
use Module::ScanDeps;

my $libs = <<'EOF';
    "/1//foo/bar",
    '/2/foo/bar',
    "C:\\3\\foo\\bar",
    q"/4/foo/bar",
    qq"/5/foo/bar",
    q:/6/foo/bar:,
    qq:/7/foo/bar:,
    q/\/8\/foo\/bar/,
    qq/\\9\/foo\/bar/,
    q[/10/foo/bar],
    qq(/11/foo/bar),
    q[/12/foo/bar],
    qq(/13/foo/bar),
    q[/14/foo/bar(1)],
    ("/15/foo", '/16/bar', q/17quux/),
    qw(fred barnie),
    qw/wilma pebbles betty bamm-bamm/,
EOF

my @expected = eval "($libs)";
plan tests => scalar @expected;

#diag("---\n$libs---");
#diag("@expected");

while ((my $got, $libs) = Module::ScanDeps::_parse_libs($libs))
{
    is $got, shift @expected;
}