mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
Finish cmdline tests
This commit is contained in:
parent
e05629e7fd
commit
715d840718
@ -46,6 +46,7 @@ EXTRA_DIST = \
|
||||
config-bad.xml \
|
||||
config-bad2.xml \
|
||||
config-bad3.xml \
|
||||
config-bad4.xml
|
||||
config-bad4.xml \
|
||||
playlist.txt
|
||||
|
||||
CLEANFILES = *~ *.core core *.gcno *.gcda
|
||||
|
@ -11,6 +11,16 @@ extern int optind;
|
||||
|
||||
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
|
||||
|
||||
@ -55,6 +65,15 @@ END_TEST
|
||||
|
||||
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
|
||||
|
||||
|
5
tests/playlist.txt
Normal file
5
tests/playlist.txt
Normal file
@ -0,0 +1,5 @@
|
||||
1.ogg
|
||||
2.ogg
|
||||
3.ogg
|
||||
4.ogg
|
||||
5.ogg
|
Loading…
Reference in New Issue
Block a user