Add a wrapper for fsync() function

Closes issue #35
This commit is contained in:
Todd Goyen
2019-09-13 19:53:15 +02:00
committed by Emmanuel Fleury
parent 96c25ceba6
commit 3636bb5fe1
4 changed files with 31 additions and 0 deletions

View File

@@ -866,6 +866,7 @@ test_set_contents (void)
fd = g_file_open_tmp (NULL, &name, &error);
g_assert_no_error (error);
write (fd, "a", 1);
g_assert_cmpint (g_fsync (fd), ==, 0);
close (fd);
ret = g_file_get_contents (name, &buf, &len, &error);