1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Merge branch 'develop' of ssh://git.xiph.org/ezstream into develop

This commit is contained in:
Moritz Grimm 2017-09-28 12:16:57 +02:00
commit 8a74a830fc

View File

@ -3,6 +3,7 @@
#include "cfg.h"
#include "mdata.h"
#include "stream.h"
#include "xalloc.h"
Suite * stream_suite(void);
void setup_checked(void);
@ -67,19 +68,27 @@ START_TEST(test_stream)
cfg_set_metadata_no_updates("no", NULL);
ck_assert_int_ne(stream_set_metadata(s1, NULL, NULL), 0);
/*
* Not running stream_set_metadata checked as libshout behaves
* different on different systems, making these unreliable ...
*/
m_str = NULL;
stream_set_metadata(s1, m, &m_str);
xfree(m_str);
m_str = NULL;
ck_assert_int_ne(stream_set_metadata(s1, m, &m_str), 0);
ck_assert_ptr_eq(m_str, NULL);
ck_assert_int_eq(mdata_parse_file(m, SRCDIR "/test15-title.ogg"), 0);
ck_assert_int_ne(stream_set_metadata(s1, m, &m_str), 0);
ck_assert_ptr_eq(m_str, NULL);
stream_set_metadata(s1, m, &m_str);
xfree(m_str);
m_str = NULL;
ck_assert_int_eq(mdata_parse_file(m, SRCDIR "/test16-nometa.ogg"), 0);
ck_assert_int_ne(stream_set_metadata(s1, m, &m_str), 0);
ck_assert_ptr_eq(m_str, NULL);
stream_set_metadata(s1, m, &m_str);
xfree(m_str);
m_str = NULL;
cfg_set_metadata_format_str("test", NULL);
ck_assert_int_eq(mdata_parse_file(m, SRCDIR "/test01-artist+album+title.ogg"), 0);
ck_assert_int_ne(stream_set_metadata(s1, m, &m_str), 0);
ck_assert_ptr_eq(m_str, NULL);
stream_set_metadata(s1, m, &m_str);
xfree(m_str);
m_str = NULL;
mdata_destroy(&m);
}