You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When monitoring a symlink under T::MF
the perl internals readlink works fine but Cwd::abs_path is a failure...
unfortunately not having this working would either push to avoid Cwd in production code
or avoid T::MF in tests...
here is an example:
#!perluse Test::MockFile qw{nostrict};
use Cwd;
use Test::More;
my ( $SRC, $DST ) = ( '/src', '/dest' );
# cleanupunlink$SRCif-e$SRC;
unlink$DSTif-l$DST;
symlink( $SRC, $DST );
ok -l$DST;
ok readlink( $DST ), $SRC;
my$mock = Test::MockFile->symlink( '/different', $DST );
is readlink( $DST ), '/different', 'readlink';
is Cwd::abs_path( $DST ), '/different', 'Cwd';
output
╰─> perl -Ilib test.pl
ok 1
ok 2 - /src
ok 3 - readlink
not ok 4 - Cwd
# Failed test 'Cwd'
# at test.pl line 22.
# got: '/src'
# expected: '/different'
# Tests were run but no plan was declared and done_testing() was not seen.
The text was updated successfully, but these errors were encountered:
When monitoring a symlink under T::MF
the perl internals
readlink
works fine butCwd::abs_path
is a failure...unfortunately not having this working would either push to avoid Cwd in production code
or avoid T::MF in tests...
here is an example:
output
The text was updated successfully, but these errors were encountered: