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.
This commit is contained in:
13
morituri/test/strokes-someday.eac.cue
Normal file
13
morituri/test/strokes-someday.eac.cue
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user