diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2016-03-30 21:45:38 +0100 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2016-03-30 21:45:38 +0100 |
commit | 26a30c6d09e4972355a9d369a2fcf70df4e7a6ce (patch) | |
tree | fbd6ca143d40547ed76288a8f74e373575d43e9d /tests/common.rb | |
parent | 8e1732726b2b803f1cea87c2ae8f553ab451e8fe (diff) | |
download | bindfs-26a30c6d09e4972355a9d369a2fcf70df4e7a6ce.tar.gz |
Added test case for issue #30 and improved an earlier test case.
Diffstat (limited to 'tests/common.rb')
-rwxr-xr-x | tests/common.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |