tests: Fix to use GFile instead of uris
This commit is contained in:
parent
ca08220560
commit
dfa7714cc5
|
@ -122,11 +122,7 @@ test_loader (const gchar *filename,
|
||||||
G_CALLBACK (on_document_loaded),
|
G_CALLBACK (on_document_loaded),
|
||||||
data);
|
data);
|
||||||
|
|
||||||
uri = g_file_get_uri (file);
|
xed_document_load (document, file, xed_encoding_get_utf8 (), 0, FALSE);
|
||||||
|
|
||||||
xed_document_load (document, uri, xed_encoding_get_utf8 (), 0, FALSE);
|
|
||||||
|
|
||||||
g_free (uri);
|
|
||||||
|
|
||||||
while (!test_completed)
|
while (!test_completed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,12 +215,11 @@ test_saver (const gchar *filename_or_uri,
|
||||||
test_completed = FALSE;
|
test_completed = FALSE;
|
||||||
|
|
||||||
file = g_file_new_for_commandline_arg (filename_or_uri);
|
file = g_file_new_for_commandline_arg (filename_or_uri);
|
||||||
uri = g_file_get_uri (file);
|
|
||||||
existed = g_file_query_exists (file, NULL);
|
existed = g_file_query_exists (file, NULL);
|
||||||
|
|
||||||
ensure_mounted (file);
|
ensure_mounted (file);
|
||||||
|
|
||||||
xed_document_save_as (document, uri, xed_encoding_get_utf8 (), save_flags);
|
xed_document_save_as (document, file, xed_encoding_get_utf8 (), save_flags);
|
||||||
|
|
||||||
while (!test_completed)
|
while (!test_completed)
|
||||||
{
|
{
|
||||||
|
@ -232,7 +231,6 @@ test_saver (const gchar *filename_or_uri,
|
||||||
g_file_delete (file, NULL, NULL);
|
g_file_delete (file, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (uri);
|
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
|
|
||||||
saver_test_data_free (data);
|
saver_test_data_free (data);
|
||||||
|
|
Loading…
Reference in New Issue