2 * Copyright (C) 2012,2013 Toni Gundogdu <legatvs@gmail.com>
4 * This file is part of libquvi <http://quvi.sourceforge.net/>.
6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU Affero General Public
8 * License as published by the Free Software Foundation, either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General
17 * Public License along with this program. If not, see
18 * <http://www.gnu.org/licenses/>.
29 /* media/ted.lua uses the "goto_url" instruction. */
31 static const gchar URL
[] =
32 "http://www.ted.com/talks/paul_lewis_crowdsourcing_the_news.html";
34 static const gchar TITLE
[] =
35 "TEDxThessaloniki - Paul Lewis - Citizen Journalism";
37 static void test_goto_url()
43 if (chk_internet() == FALSE
|| chk_skip(__func__
) == TRUE
)
48 g_assert_cmpint(quvi_errcode(q
), ==, QUVI_OK
);
52 qm
= quvi_media_new(q
, URL
);
53 g_assert_cmpint(qerr_m(q
, URL
), ==, QUVI_OK
);
56 quvi_media_get(qm
, QUVI_MEDIA_PROPERTY_TITLE
, &s
);
57 g_assert_cmpint(quvi_errcode(q
), ==, QUVI_OK
);
58 g_assert_cmpstr(s
, ==, TITLE
);
64 gint
main(gint argc
, gchar
**argv
)
66 g_test_init(&argc
, &argv
, NULL
);
67 g_test_add_func("/quvi/goto URL", test_goto_url
);
68 return (g_test_run());
71 /* vim: set ts=2 sw=2 tw=72 expandtab: */