f2f437fc23ea68a73e569b1215dec6ba31d2d200
[libquvi-scripts.git] / tests / media / media_canalplus.c
blobf2f437fc23ea68a73e569b1215dec6ba31d2d200
1 /* libquvi-scripts
2 * Copyright (C) 2013 Mohamed El Morabity <melmorabity@fedoraproject.org>
3 * Copyright (C) 2013 Toni Gundogdu <legatvs@gmail.com>
5 * This file is part of libquvi-scripts <http://quvi.sourceforge.net>.
7 * This program is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU Affero General Public
9 * License as published by the Free Software Foundation, either
10 * version 3 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General
18 * Public License along with this program. If not, see
19 * <http://www.gnu.org/licenses/>.
22 #include "config.h"
24 #include <string.h>
25 #include <glib.h>
26 #include <quvi.h>
28 #include "tests.h"
30 static const gchar *URLs[] =
32 "http://www.canalplus.fr/c-divertissement/pid1784-c-les-guignols.html?vid=791262",
33 "http://www.d8.tv/d8-divertissement/pid5200-d8-le-grand-8.html?vid=954696",
34 "http://www.d17.tv/docs-mags/pid6273-musique.html?vid=933914",
35 NULL
38 static const gchar *TITLEs[] =
40 "Les Guignols de l'Info du 11/11/13",
41 "Face à face : Amanda Lear vs Roselyne Bachelot",
42 "Pink Floyd : Behind «the wall»",
43 NULL
46 static const gchar *IDs[] =
48 "969879",
49 "954696",
50 "933914",
51 NULL
54 static void test_media_canalplus()
56 struct qm_test_exact_s e;
57 struct qm_test_opts_s o;
58 gint i;
60 for (i=0; URLs[i] != NULL; ++i)
62 memset(&e, 0, sizeof(e));
63 memset(&o, 0, sizeof(o));
65 e.title = TITLEs[i];
66 e.id = IDs[i];
68 qm_test(__func__, URLs[i], &e, &o);
72 gint main(gint argc, gchar **argv)
74 g_test_init(&argc, &argv, NULL);
75 g_test_add_func("/media/canalplus", test_media_canalplus);
76 return (g_test_run());
79 /* vim: set ts=2 sw=2 tw=72 expandtab: */