[tracker-miners/wip/jfelder/add-flac-test] functional tests: Add a flac extraction test



commit 85439dab78a05ef48a221cb92c81c95a2f90ccf9
Author: Jean Felder <jean felder gmail com>
Date:   Tue Feb 25 22:33:28 2020 +0100

    functional tests: Add a flac extraction test

 tests/functional-tests/meson.build                 |   1 +
 .../audio/flac-extraction.expected.json            |  39 +++++++++++++++++++++
 .../audio/flac-extraction.flac                     | Bin 0 -> 763740 bytes
 3 files changed, 40 insertions(+)
---
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 7e5037f39..fd7cf6589 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -34,6 +34,7 @@ extractor_tests = [
   'audio/mp3-id3v2.4-1',
   'audio/mp3-id3v2.3-empty-artist-album',
   'audio/mp3-id3v2.4-2',
+  'audio/flac-extraction'
 ]
 
 if libvorbis.found()
diff --git a/tests/functional-tests/test-extraction-data/audio/flac-extraction.expected.json 
b/tests/functional-tests/test-extraction-data/audio/flac-extraction.expected.json
new file mode 100644
index 000000000..3f6289605
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/audio/flac-extraction.expected.json
@@ -0,0 +1,39 @@
+{
+    "test": {
+        "Filename": "flac-extraction.flac"
+    },
+    "metadata": {
+        "@type": [
+            "nfo:Audio",
+            "nmm:MusicPiece"
+        ],
+        "nfo:channels": "2",
+        "nfo:duration": "10",
+        "nfo:genre": "Rock",
+        "nfo:sampleRate": "44100",
+        "nie:comment": "no comment",
+        "nie:contentCreated": "2020-01-01T00:00:00+00:00",
+        "nie:copyright": "none",
+        "nie:title": "track title",
+        "nmm:trackNumber": "12",
+        "nmm:musicAlbum": {
+            "@type": "nmm:MusicAlbum",
+            "nie:title": "awesome album",
+            "nmm:albumTrackCount": "28",
+            "nmm:albumArtist": [
+                {
+                    "@type": "nmm:Artist",
+                    "nmm:artistName": "my album artist"
+                }
+            ]
+        },
+        "nmm:musicAlbumDisc": {
+            "@type": "nmm:MusicAlbumDisc",
+            "nmm:setNumber": 1
+        },
+        "nmm:performer": {
+            "@type": "nmm:Artist",
+            "nmm:artistName": "my artist"
+        }
+    }
+}
diff --git a/tests/functional-tests/test-extraction-data/audio/flac-extraction.flac 
b/tests/functional-tests/test-extraction-data/audio/flac-extraction.flac
new file mode 100644
index 000000000..ec7ce3795
Binary files /dev/null and b/tests/functional-tests/test-extraction-data/audio/flac-extraction.flac differ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]