test/tc/closeoncopy.rb in rio-0.3.8 vs test/tc/closeoncopy.rb in rio-0.3.9
- old
+ new
@@ -11,10 +11,13 @@
@@once = false
def self.once
@@once = true
make_lines_file(3,'f0')
+ rio('d0').delete!.mkdir.chdir {
+ make_lines_file(3,'f1')
+ }
end
def setup
super
self.class.once unless @@once
@@ -83,9 +86,17 @@
ato(rio(@f0),rio('copyto'))
ato(rio(@f0),rio('copyto').open('w'))
ato(rio(@f0),rio('copyto').open('a'))
ato(rio(@f0),orio)
end
-
-
+ def test_cx_set
+ rio('d0').files { |f|
+ assert(f.closeoncopy?)
+ }
+ end
+ def test_cx_bequeath
+ rio('d0').nocloseoncopy.files { |f|
+ assert!(f.closeoncopy?)
+ }
+ end
end
__END__