diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-01-02 20:57:45 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-01-02 20:57:45 +0100 |
commit | 0eafefb944581c3c9e208d6eabae4d98bcbb20fa (patch) | |
tree | 3d8c74a616da7abc7496c1b182132c8977fb9c81 /t/01-test.t | |
parent | 167eda42ab619f7572fbc3a5f07158bdcf9d4279 (diff) | |
download | sbotools2-0eafefb944581c3c9e208d6eabae4d98bcbb20fa.tar.xz |
Since we chdir() __FILE__ doesn't work. Use FindBin's $RealScript instead.
Diffstat (limited to 't/01-test.t')
-rwxr-xr-x | t/01-test.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/01-test.t b/t/01-test.t index 2816a59..f1f9117 100755 --- a/t/01-test.t +++ b/t/01-test.t @@ -8,7 +8,7 @@ use Test::More; use Test::Output; use File::Copy; use Text::Diff; -use FindBin '$RealBin'; +use FindBin '$RealBin', '$RealScript'; BEGIN { chdir($RealBin); @@ -44,7 +44,7 @@ is($config{LOCAL_OVERRIDES}, 'FALSE', 'config{LOCAL_OVERRIDES} is good'); # 7: open_read, open_fh tests { - my $fh = open_read(__FILE__); + my $fh = open_read($RealScript); is(ref $fh, 'GLOB', 'open_read works'); close $fh; } |