2 * Copyright (C) 2012 Toni Gundogdu <legatvs@gmail.com>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28 /* academicearth.lua uses the "goto_url" instruction. */
30 static const gchar URL
[] =
31 "http://www.academicearth.org/lectures/intro-roman-architecture";
33 static const gchar TITLE
[] = "1. Introduction to Roman Architecture";
35 static void test_goto_url()
41 if (chk_internet() == FALSE
)
44 if (chk_skip(__func__
) == TRUE
)
49 g_assert_cmpint(qerr(q
), ==, QUVI_OK
);
53 qm
= quvi_media_new(q
, URL
);
54 g_assert_cmpint(qerr_m(q
, URL
), ==, QUVI_OK
);
57 quvi_media_get(qm
, QUVI_MEDIA_PROPERTY_TITLE
, &s
);
58 g_assert_cmpint(qerr(q
), ==, QUVI_OK
);
59 g_assert_cmpstr(s
, ==, TITLE
);
65 gint
main(gint argc
, gchar
**argv
)
67 g_test_init(&argc
, &argv
, NULL
);
68 g_test_add_func("/quvi/goto URL", test_goto_url
);
69 return (g_test_run());
72 /* vim: set ts=2 sw=2 tw=72 expandtab: */