From 26a30c6d09e4972355a9d369a2fcf70df4e7a6ce Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Wed, 30 Mar 2016 21:45:38 +0100 Subject: Added test case for issue #30 and improved an earlier test case. --- tests/common.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/common.rb') diff --git a/tests/common.rb b/tests/common.rb index 5701123..518aab2 100755 --- a/tests/common.rb +++ b/tests/common.rb @@ -66,6 +66,15 @@ def wait_for(options = {}, &condition) true end +def with_umask(umask, &block) + old_umask = File.umask(umask) + begin + block.call + ensure + File.umask(old_umask) + end +end + def valgrind_options opt = ARGV.find {|s| s.start_with?('--valgrind') } if opt == nil -- cgit v1.2.3