diff options
author | Niels Thykier <niels@thykier.net> | 2016-05-01 07:16:28 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2016-05-01 07:16:28 +0000 |
commit | 6ec3eae0227c32eeb4b08b5da787709e75f56e7b (patch) | |
tree | 8e53fb0080940896d5a842065fca5da277fafe1f /t/buildsystems | |
parent | 32dea5d8140606c9756634905f3baeaa97d0b2c7 (diff) | |
download | debhelper-6ec3eae0227c32eeb4b08b5da787709e75f56e7b.tar.gz |
t: Migrate to 3-arg open
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 't/buildsystems')
-rwxr-xr-x | t/buildsystems/buildsystem_tests.t | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/buildsystems/buildsystem_tests.t b/t/buildsystems/buildsystem_tests.t index e90b86da..6493caea 100755 --- a/t/buildsystems/buildsystem_tests.t +++ b/t/buildsystems/buildsystem_tests.t @@ -466,8 +466,9 @@ sub dh_auto_do_autoconf { @extra_args = &$do_dh_auto('configure'); ok ( -f "$buildpath/Makefile", "$buildpath/Makefile exists" ); @lines=(); - if (ok( open(FILE, "$buildpath/stamp_configure"), "$buildpath/stamp_configure exists") ) { + if ( ok(open(FILE, '<', "$buildpath/stamp_configure"), "$buildpath/stamp_configure exists") ) { @lines = @{readlines(\*FILE)}; + close(FILE); } is_deeply( \@lines, \@extra_args, "$buildpath/stamp_configure contains extra args" ); @@ -475,15 +476,17 @@ sub dh_auto_do_autoconf { ok ( -f "$buildpath/stamp_build", "$buildpath/stamp_build exists" ); &$do_dh_auto('test'); @lines=(); - if ( ok(open(FILE, "$buildpath/stamp_test"), "$buildpath/stamp_test exists") ) { + if ( ok(open(FILE, '<', "$buildpath/stamp_test"), "$buildpath/stamp_test exists") ) { @lines = @{readlines(\*FILE)}; + close(FILE); } is_deeply( \@lines, [ "VERBOSE=1" ], "$buildpath/stamp_test contains VERBOSE=1" ); &$do_dh_auto('install'); @lines=(); - if ( ok(open(FILE, "$buildpath/stamp_install"), "$buildpath/stamp_install exists") ) { + if ( ok(open(FILE, '<', "$buildpath/stamp_install"), "$buildpath/stamp_install exists") ) { @lines = @{readlines(\*FILE)}; + close(FILE); } is_deeply( \@lines, [ "DESTDIR=".Cwd::getcwd()."/debian/testpackage" ], "$buildpath/stamp_install contains DESTDIR" ); |