]> gitweb.factorcode.org Git - factor.git/blob - extra/id3/id3-tests.factor
Merge OneEyed's patch
[factor.git] / extra / id3 / id3-tests.factor
1 ! Copyright (C) 2009 Tim Wawrzynczak
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test id3 combinators ;
4 IN: id3.tests
5
6 : id3-params ( id3 -- title artist album year comment genre )
7     {
8         [ id3-title ]
9         [ id3-artist ]
10         [ id3-album ]
11         [ id3-year ]
12         [ id3-comment ]
13         [ id3-genre ]
14     } cleave ;
15
16 [
17    "BLAH"
18    "ARTIST"
19    "ALBUM"
20    "2009"
21    "COMMENT"
22    "Bluegrass"
23 ] [ "vocab:id3/tests/blah.mp3" file-id3-tags id3-params ] unit-test
24
25 [
26     "Anthem of the Trinity"
27     "Terry Riley"
28     "Shri Camel"
29     f
30     f
31     "Classical"
32 ] [ "vocab:id3/tests/blah2.mp3" file-id3-tags id3-params ] unit-test
33
34 [    
35    "Stormy Weather"
36    "Frank Sinatra"
37    "Night and Day Frank Sinatra"
38     f
39    "eng, AG# 08E1C12E"
40    "Big Band"
41 ] [ "vocab:id3/tests/blah3.mp3" file-id3-tags id3-params ] unit-test
42