File: 013_false_path_components.t

package info (click to toggle)
libpath-router-perl 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: perl: 1,863; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More 1.001013;

use Path::Router;

for my $inline (0, 1) {
    for my $path ('0/1', '1/0') {
        my $router = Path::Router->new(inline => $inline);
        $router->add_route($path);
        my $match = $router->match($path);
        ok($match);
        is_deeply($match->route->components, [split '/', $path]);
    }
}

done_testing;