X-Git-Url: http://git.code-monkey.de/?p=ruby-vorbistagger.git;a=blobdiff_plain;f=test%2Ftest_main.rb;fp=test%2Ftest_main.rb;h=a4a14504d463f1bf3f91786fd7b28445b1f4c97b;hp=6355e7e9d23fca663d55283d059b51f427a71804;hb=e04f6c2b90c9501fc613a130ee90863cc84f4a98;hpb=48f59b2b6685342bdc1a9227127639c62c83d517 diff --git a/test/test_main.rb b/test/test_main.rb index 6355e7e..a4a1450 100644 --- a/test/test_main.rb +++ b/test/test_main.rb @@ -77,6 +77,16 @@ class MainTest < Test::Unit::TestCase 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"