File: _relative.t

package info (click to toggle)
libtest-files-perl 0.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 352 kB
  • sloc: perl: 406; makefile: 7
file content (13 lines) | stat: -rw-r--r-- 499 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings
  FATAL    => qw( all ),
  NONFATAL => qw( deprecated exec internal malloc newline once portable redefine recursion uninitialized );

use Test::Expander -tempfile => {};

plan( 2 );

is( $CLASS->_init->               $METHOD( $TEMP_FILE ), $TEMP_FILE,                            'base directory undefined' );

my $base = path( $TEMP_FILE )->dirname;
is( $CLASS->_init->base( $base )->$METHOD( $TEMP_FILE ), path( $TEMP_FILE )->relative( $base ), 'base directory defined' );