Skip to content

Commit

Permalink
fixup! Use lowercase for implicit_current_dir option
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Oct 15, 2022
1 parent 52a2bdd commit 808f417
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions t/file_which.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Test::More tests => 19;
use File::Spec ();
use File::Which qw(which where);

unless (File::Which::_is_vms or File::Which::_is_mac or File::Which::_is_win ) {
unless (File::Which::_is_vms() or File::Which::_is_mac() or File::Which::_is_win() ) {
foreach my $path (qw(
corpus/test-bin-unix/test3
corpus/test-bin-unix/all
Expand Down Expand Up @@ -35,24 +35,24 @@ unless (File::Which::_is_vms or File::Which::_is_mac or File::Which::_is_win ) {
);

# Where is the test application
my $test_bin = File::Spec->catdir( 'corpus', File::Which::_is_win ? 'test-bin-win' : 'test-bin-unix' );
my $test_bin = File::Spec->catdir( 'corpus', File::Which::_is_win() ? 'test-bin-win' : 'test-bin-unix' );
ok( -d $test_bin, 'Found test-bin' );

# Set up for running the test application
@PATH = $test_bin;
push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if File::Which::_is_cyg;
push @PATH, File::Spec->catdir( 'corpus', 'test-bin-win' ) if File::Which::_is_cyg();

SKIP: {
skip("Not on DOS-like filesystem", 3) unless File::Which::_is_win;
skip("Not on DOS-like filesystem", 3) unless File::Which::_is_win();
is( lc scalar which('test1'), 'corpus\test-bin-win\test1.exe', 'Looking for test1.exe' );
is( lc scalar which('test2'), 'corpus\test-bin-win\test2.bat', 'Looking for test2.bat' );
is( scalar which('test3'), undef, 'test3 returns undef' );
}

SKIP: {
skip("Not on a UNIX filesystem", 1) if File::Which::_is_win;
skip("Not on a UNIX filesystem", 1) if File::Which::_is_mac;
skip("Not on a UNIX filesystem", 1) if File::Which::_is_vms;
skip("Not on a UNIX filesystem", 1) if File::Which::_is_win();
skip("Not on a UNIX filesystem", 1) if File::Which::_is_mac();
skip("Not on a UNIX filesystem", 1) if File::Which::_is_vms();
is(
scalar(which('test3')),
File::Spec->catfile( $test_bin, 'test3'),
Expand All @@ -61,7 +61,7 @@ unless (File::Which::_is_vms or File::Which::_is_mac or File::Which::_is_win ) {
}

SKIP: {
skip("Not on a cygwin filesystem", 2) unless File::Which::_is_cyg;
skip("Not on a cygwin filesystem", 2) unless File::Which::_is_cyg();

# Cygwin: should make test1.exe transparent
is(
Expand All @@ -78,7 +78,7 @@ unless (File::Which::_is_vms or File::Which::_is_mac or File::Which::_is_win ) {

# Make sure that .\ stuff works on DOSish, VMS, MacOS (. is in PATH implicitly).
SKIP: {
unless ( File::Which::_is_win or File::Which::_is_vms ) {
unless ( File::Which::_is_win() or File::Which::_is_vms() ) {
skip("Not on a DOS or VMS filesystem", 1);
}

Expand Down

0 comments on commit 808f417

Please sign in to comment.