[tracker-miners/wip/carlosg/cue-guess: 3/3] tests: Add extractor test for PSX game image




commit e4072f7eeb5403e7deb28e94afad6bb9a00ae560
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Feb 14 15:20:52 2021 +0100

    tests: Add extractor test for PSX game image
    
    Add a mangled/minimal PSX game image that lets us test the
    generic-disc extractor with these.

 tests/functional-tests/meson.build                     |   4 ++++
 .../disc-images/psx-game-image-1.bin                   | Bin 0 -> 184320 bytes
 .../disc-images/psx-game-image-1.cue                   |   3 +++
 .../disc-images/psx-game-image-1.expected.json         |  10 ++++++++++
 4 files changed, 17 insertions(+)
---
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 7f1f5a7b7..f449b4c98 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -95,6 +95,10 @@ if totem_plparser.found()
   extractor_tests += 'playlists/playlist-test-1'
 endif
 
+if libcue.found()
+  extractor_tests += 'disc-images/psx-game-image-1'
+endif
+
 if libgsf.found()
   extractor_tests += [
     'office/oasis-doc',
diff --git a/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.bin 
b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.bin
new file mode 100644
index 000000000..8eac888dd
Binary files /dev/null and b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.bin 
differ
diff --git a/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.cue 
b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.cue
new file mode 100644
index 000000000..2dd2b6535
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.cue
@@ -0,0 +1,3 @@
+FILE "psx-game-image-1.bin" BINARY
+  TRACK 01 MODE2/2352
+    INDEX 01 00:00:00
diff --git a/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.expected.json 
b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.expected.json
new file mode 100644
index 000000000..6f01116ed
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/disc-images/psx-game-image-1.expected.json
@@ -0,0 +1,10 @@
+{
+    "test": {
+        "Filename": "psx-game-image-1.cue",
+        "Comment": "PSX game image with CUE file"
+    },
+    "metadata": {
+        "@type": [ "nfo:GameImage" ],
+       "nie:mimeType": "application/x-cue"
+    }
+}


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