[FFmpeg-devel] [PATCH] fate: add id3v2 test
rshaffer at tunein.com
rshaffer at tunein.com
Sun Jan 28 04:21:28 EET 2018
From: Richard Shaffer <rshaffer at tunein.com>
Adds basic unit test for parsing ID3v2 tags.
---
This is the second time I'm attempting to send it. Sent it through an email
client before, and it seems to have removed the leading white space.
tests/Makefile | 1 +
tests/fate-run.sh | 4 ++++
tests/fate/id3v2.mak | 6 ++++++
tests/ref/fate/id3v2-read | 5 +++++
4 files changed, 16 insertions(+)
create mode 100644 tests/fate/id3v2.mak
create mode 100644 tests/ref/fate/id3v2-read
diff --git a/tests/Makefile b/tests/Makefile
index 14b9601378..327e3f4420 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -130,6 +130,7 @@ include $(SRC_PATH)/tests/fate/gapless.mak
include $(SRC_PATH)/tests/fate/gif.mak
include $(SRC_PATH)/tests/fate/h264.mak
include $(SRC_PATH)/tests/fate/hevc.mak
+include $(SRC_PATH)/tests/fate/id3v2.mak
include $(SRC_PATH)/tests/fate/image.mak
include $(SRC_PATH)/tests/fate/indeo.mak
include $(SRC_PATH)/tests/fate/libavcodec.mak
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 05f4ca5e20..82862b7ef4 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -88,6 +88,10 @@ probefmt(){
run ffprobe${PROGSUF} -show_entries format=format_name -print_format default=nw=1:nk=1 -v 0 "$@"
}
+probetags(){
+ run ffprobe${PROGSUF} -show_entries format_tags -v 0 "$@"
+}
+
runlocal(){
test "${V:-0}" -gt 0 && echo ${base}/"$@" ${base} >&3
${base}/"$@" ${base}
diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak
new file mode 100644
index 0000000000..af60ee12b5
--- /dev/null
+++ b/tests/fate/id3v2.mak
@@ -0,0 +1,6 @@
+ID3V2_TEST_FILE=tests/data/id3v2-test.mp3
+
+FATE_SAMPLES_ID3V2-$(CONFIG_MP3_DEMUXER) += fate-id3v2-read
+fate-id3v2-read: CMD = probetags $(TARGET_SAMPLES)/id3v2/id3v2-test.mp3
+
+FATE_SAMPLES_FFPROBE += $(FATE_SAMPLES_ID3V2-yes)
\ No newline at end of file
diff --git a/tests/ref/fate/id3v2-read b/tests/ref/fate/id3v2-read
new file mode 100644
index 0000000000..965c8695e8
--- /dev/null
+++ b/tests/ref/fate/id3v2-read
@@ -0,0 +1,5 @@
+[FORMAT]
+TAG:title=id3v2-test
+TAG:id3v2_priv.testowner=testdata
+TAG:id3v2_priv.testowner2=\x00\x01\x02
+[/FORMAT]
--
2.14.3 (Apple Git-98)
More information about the ffmpeg-devel
mailing list