@ -44,7 +44,7 @@ ztk_rsvg_load_svg (
{
ztk_error (
"An error occurred parsing the SVG file at "
"%s: %s", abs_path);
"%s: %s", abs_path, err->message);
g_object_unref (file);
return NULL;
}
@ -48,4 +48,5 @@ if get_option('enable_rsvg')
test ('rsvg_test', e,
args: join_paths(
meson.current_source_dir(), 'test.svg'))
test ('rsvg_test_invalid', e, args: 'invalid')
endif
@ -26,7 +26,16 @@ int main (
ZtkRsvgHandle * handle =
ztk_rsvg_load_svg (argv[1]);
ztk_assert (handle);
if (strcmp (argv[1], "invalid"))
else
ztk_assert (!handle);
return 0;
int width =
ztk_rsvg_get_width (handle);