1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Finish cmdline tests

This commit is contained in:
Moritz Grimm 2015-05-26 14:15:11 +02:00
parent e05629e7fd
commit 715d840718
3 changed files with 26 additions and 1 deletions

View File

@ -46,6 +46,7 @@ EXTRA_DIST = \
config-bad.xml \ config-bad.xml \
config-bad2.xml \ config-bad2.xml \
config-bad3.xml \ config-bad3.xml \
config-bad4.xml config-bad4.xml \
playlist.txt
CLEANFILES = *~ *.core core *.gcno *.gcda CLEANFILES = *~ *.core core *.gcno *.gcda

View File

@ -11,6 +11,16 @@ extern int optind;
START_TEST(test_configfile) START_TEST(test_configfile)
{ {
char *argv[] =
{
"check_cmdline", "-c", EXAMPLESDIR "/ezstream-full.xml" , NULL
};
int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1;
int ret;
ret = 0;
ck_assert_int_eq(cmdline_parse(argc, argv, &ret), 0);
ck_assert_int_eq(ret, 0);
} }
END_TEST END_TEST
@ -55,6 +65,15 @@ END_TEST
START_TEST(test_shuffle) START_TEST(test_shuffle)
{ {
char *argv[] =
{
"check_cmdline", "-s", SRCDIR "/playlist.txt", NULL
};
int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1;
int ret;
ck_assert_int_ne(cmdline_parse(argc, argv, &ret), 0);
ck_assert_int_eq(ret, 0);
} }
END_TEST END_TEST

5
tests/playlist.txt Normal file
View File

@ -0,0 +1,5 @@
1.ogg
2.ogg
3.ogg
4.ogg
5.ogg