projects
/
ruby-vorbistagger.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Keep the original file mode when writing files.
[ruby-vorbistagger.git]
/
test
/
test_main.rb
diff --git
a/test/test_main.rb
b/test/test_main.rb
index 6355e7e9d23fca663d55283d059b51f427a71804..a4a14504d463f1bf3f91786fd7b28445b1f4c97b 100644
(file)
--- a/
test/test_main.rb
+++ b/
test/test_main.rb
@@
-77,6
+77,16
@@
class MainTest < Test::Unit::TestCase
end
end
end
end
+ def test_write_keeps_file_mode
+ mode = File.stat(OGG_FILE).mode
+
+ Ogg::Vorbis::Tagger.open(OGG_FILE) do |t|
+ t.write
+ end
+
+ assert_equal(mode, File.stat(OGG_FILE).mode)
+ end
+
def test_append
Ogg::Vorbis::Tagger.open(OGG_FILE) do |t|
t.comments["genre"] = "Death Metal"
def test_append
Ogg::Vorbis::Tagger.open(OGG_FILE) do |t|
t.comments["genre"] = "Death Metal"