[glib/2325-symlink-replace-file: 4/4] fixup! tests: Add comprehensive tests for static behaviour of g_file_replace()




commit 37e729b8554c8b9790fe7f8a697ad22ea81d251c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Mar 10 17:49:22 2021 +0000

    fixup! tests: Add comprehensive tests for static behaviour of g_file_replace()

 gio/tests/file.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index d99838d54..c1a2a9360 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -915,7 +915,7 @@ test_replace_symlink (void)
 /* FIXME: These tests have only been checked on Linux. Most of them are probably
  * applicable on Windows, too, but that has not been tested yet.
  * See https://gitlab.gnome.org/GNOME/glib/-/issues/2325 */
-#ifdef G_OS_UNIX
+#ifdef __linux__
 
 /* Different kinds of file which create_test_file() can create. */
 typedef enum
@@ -1148,7 +1148,7 @@ check_test_file (GFile             *test_file,
   g_free (target_basename);
 }
 
-#endif  /* G_OS_UNIX */
+#endif  /* __linux__ */
 
 /* A big test for g_file_replace() and g_file_replace_readwrite(). The
  * @test_data is a boolean: %TRUE to test g_file_replace_readwrite(), %FALSE to
@@ -1169,7 +1169,7 @@ check_test_file (GFile             *test_file,
 static void
 test_replace (gconstpointer test_data)
 {
-#ifdef G_OS_UNIX
+#ifdef __linux__
   gboolean read_write = GPOINTER_TO_UINT (test_data);
   const gchar *new_contents = "this is a new test message which should be written to source";
   const gchar *original_source_contents = "this is some test content in source";
@@ -1813,8 +1813,8 @@ test_replace (gconstpointer test_data)
       g_clear_object (&source_file);
       g_clear_object (&tmpdir);
     }
-#else  /* if !G_OS_UNIX */
-  g_test_skip ("File replacement tests can only be run on Unix")
+#else  /* if !__linux__ */
+  g_test_skip ("File replacement tests can only be run on Linux");
 #endif
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]