[SCM] morituri/master: compare output .cue with EAC one we add

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:11 UTC 2014


The following commit has been merged in the master branch:
commit a8fe47f1bd1eb6604c744a9fd5b29e6d6dac9347
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Mar 3 23:11:11 2013 +0100

    compare output .cue with EAC one we add
    
    The EAC one clearly marks the HTOA of one frame as pre-gap, while we
    don't yet do that.

diff --git a/morituri/test/strokes-someday.eac.cue b/morituri/test/strokes-someday.eac.cue
new file mode 100644
index 0000000..0180794
--- /dev/null
+++ b/morituri/test/strokes-someday.eac.cue
@@ -0,0 +1,13 @@
+REM GENRE "Alternative Rock"
+REM DATE 2001
+REM DISCID 0200BA01
+REM COMMENT "ExactAudioCopy v0.99pb4"
+PERFORMER "The Strokes"
+TITLE "Someday"
+FILE "The Strokes - Someday\01 - The Strokes - Someday.wav" WAVE
+  TRACK 01 AUDIO
+    TITLE "Someday"
+    PERFORMER "The Strokes"
+    FLAGS DCP
+    PREGAP 00:00:01
+    INDEX 01 00:00:00
diff --git a/morituri/test/test_image_toc.py b/morituri/test/test_image_toc.py
index 2ffebec..e41bc73 100644
--- a/morituri/test/test_image_toc.py
+++ b/morituri/test/test_image_toc.py
@@ -353,6 +353,37 @@ class StrokesTestCase(common.TestCase):
         self.assertEquals(i1.counter, 1)
         self.assertEquals(i1.path, u'data.wav')
 
+        cue = self._filterCue(self.toc.table.cue())
+        ref = self._filterCue(open(os.path.join(os.path.dirname(__file__),
+            'strokes-someday.eac.cue')).read())
+        # FIXME: this diff should match
+        # common.diffStrings(cue, ref)
+        self.assertRaises(AssertionError, common.diffStrings, cue, ref)
+
+    def _filterCue(self, output):
+        # helper to be able to compare our generated .cue with the
+        # EAC-extracted one
+        discard = [ 'TITLE', 'PERFORMER', 'FLAGS', 'REM' ]
+        lines = output.split('\n')
+
+        res = []
+
+        for line in lines:
+            found = False
+            for needle in discard:
+                if line.find(needle) > -1:
+                    found = True
+
+            if line.find('FILE') > -1:
+                line = 'FILE "data.wav" WAVE'
+
+            if not found:
+                res.append(line)
+
+        return '\n'.join(res)
+
+
+
 
 # Surfer Rosa has
 # track 00 consisting of 32 frames of SILENCE

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list