+
+ def test_merge
+ repl = {
+ "artist" => "Ballista",
+ "genre" => "Death Metal",
+ }
+
+ Ogg::Vorbis::Tagger.open(OGG_FILE) do |t|
+ t.comments.merge!(repl)
+
+ assert_equal(["artist", "album", "date", "genre"],
+ t.comments.keys)
+ assert_equal(["Ballista", "...For Victory", "1994",
+ "Death Metal"],
+ t.comments.values)
+ end
+ end
+
+ def test_shift
+ Ogg::Vorbis::Tagger.open(OGG_FILE) do |t|
+ assert_equal(["artist", "Bolt Thrower"], t.comments.shift)
+ assert_equal(["album", "...For Victory"], t.comments.shift)
+ assert_equal(["date", "1994"], t.comments.shift)
+ assert_equal(nil, t.comments.shift)
+ end
+ end