File: 01_base.t

package info (click to toggle)
libpath-class-uri-perl 0.08-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144 kB
  • sloc: perl: 157; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 450 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
use strict;
use Test::Base;

use Path::Class;
use Path::Class::URI;
plan tests => 2 * blocks;

filters 'chomp';

run {
    my $block = shift;
    my $f = file( split '/', eval '"' . $block->input . '"' );
    is $f->uri, $block->expected;

    my $f2 = file_from_uri($f->uri);
    is $f2, $f;
};

__END__

===
--- input
bob/john.txt
--- expected
file:bob/john.txt

===
--- input
/path/foo/\xe5\x97\xad.txt
--- expected
file:///path/foo/%E5%97%AD.txt