spec/mplayer_edl.spec.rb in sensible-cinema-0.20.0 vs spec/mplayer_edl.spec.rb in sensible-cinema-0.20.1
- old
+ new
@@ -29,39 +29,42 @@
105.0 145.0 1
2793.5 2801.0 1
EOL
end
-
- it "should ignore overlaps" do
- a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>145}, "blank_outs" => {105 => 145} } )
- a.should == <<EOL
-105.0 145.0 0
-EOL
- end
-
it "should add to mutes" do
a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>106}, "blank_outs" => {110 => 111} }, 1 )
a.should == <<EOL
105.0 107.0 1
-110.0 111.0 0
+110.0 112.0 0
EOL
end
it "should catch overlaps from additions to mutes" do
- a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>106}, "blank_outs" => {106 => 107} }, 1 )
- a.should == <<EOL
+ pending do
+ a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>106}, "blank_outs" => {106 => 107} }, 1 )
+ a.should == <<-EOL
105.0 106.0 1
106.0 107.0 0
-EOL
-end
+ EOL
+ end
+ end
it "should add to beginning and ending of mutes" do
a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>106}, "blank_outs" => {110 => 111} }, 1, 1 )
a.should == <<EOL
104.0 107.0 1
-110.0 111.0 0
+109.0 112.0 0
EOL
+ end
+
+ it "should accomodate for split sections in some dvd's and order the output" do
+ a = MplayerEdl.convert_to_edl({ "mutes"=>{5=>6,105=>106}, "blank_outs" => {110 => 111}}, 0, 0, [103] )
+ a.should == <<-EOL
+2.0 3.0 1
+5.0 6.0 1
+7.0 8.0 0
+ EOL
end
end
\ No newline at end of file