From 1832ef19561682e85a3f21de12b44deb95d4110f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Sun, 19 Jul 2020 15:51:57 -0700 Subject: [PATCH] Added support for symlinks in MSYS2 For newer versions of Windows 10 in developer mode symlinks can be enabled in MSYS2 by setting the environment variable MSYS to 'winsymlinks:nativestrict'. Still, this does not support creating broken symlinks as is done _get_fresh_tmp_dir() in t/01.legacy.t. --- t/01.legacy.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/01.legacy.t b/t/01.legacy.t index 6ed726f..efa460d 100644 --- a/t/01.legacy.t +++ b/t/01.legacy.t @@ -181,7 +181,8 @@ note "functionality w/ default globals"; no warnings "redefine"; local *File::Copy::Recursive::rcopy = sub { push @rcopy_srcs, $_[0] }; rcopy_glob( "$tmpd/orig/*l*", "$tmpd/rcopy_glob" ); - is( @rcopy_srcs, $File::Copy::Recursive::CopyLink ? 4 : 1, "rcopy_glob() calls rcopy for each file in the glob" ); + my $expect = $^O eq 'msys' ? 3 : 4; + is( @rcopy_srcs, $File::Copy::Recursive::CopyLink ? $expect : 1, "rcopy_glob() calls rcopy for each file in the glob" ); } # rmove_glob() @@ -190,7 +191,8 @@ note "functionality w/ default globals"; no warnings "redefine"; local *File::Copy::Recursive::rmove = sub { push @rmove_srcs, $_[0] }; rmove_glob( "$tmpd/orig/*l*", "$tmpd/rmove_glob" ); - is( @rmove_srcs, $File::Copy::Recursive::CopyLink ? 4 : 1, "rmove_glob() calls rmove for each file in the glob" ); + my $expect = $^O eq 'msys' ? 3 : 4; + is( @rmove_srcs, $File::Copy::Recursive::CopyLink ? $expect : 1, "rmove_glob() calls rmove for each file in the glob" ); } # pathempty()