diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-06-07 00:00:22 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-06-07 00:00:22 +0200 |
commit | 147d49a97747e25597968aa05573fe1dad2aa188 (patch) | |
tree | 6ea1828f5ba796454d296cb6f9b70334b3748202 | |
parent | 71c12436d69b56dd47f1cd574a0712e4b760bf2f (diff) | |
download | sbotools2-147d49a97747e25597968aa05573fe1dad2aa188.tar.xz |
22-race.t: make sure shelling out doesn't cause output
-rwxr-xr-x | t/22-race.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/22-race.t b/t/22-race.t index 826ee22..4292148 100755 --- a/t/22-race.t +++ b/t/22-race.t @@ -51,9 +51,11 @@ sub emulate_race { # 3-4: emulate race in open_fh by get_slack_version { my $sv_file = '/etc/slackware-version'; - system('mkdir', '-p', '/etc'); - system('mv', $sv_file, "$sv_file.bak"); - system('touch', $sv_file); + capture_merged { + system('mkdir', '-p', '/etc'); + system('mv', $sv_file, "$sv_file.bak"); + system('touch', $sv_file); + }; my $exit; emulate_race($sv_file, 'open_fh'); |