[glib: 2/6] tests: fix test_set_contents_full error test on win32




commit 5f4e8f625d98dc2a1952af6896562fd8eed1100a
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Jan 21 14:53:23 2022 +0400

    tests: fix test_set_contents_full error test on win32
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 glib/tests/fileutils.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index 6264d1cd1..fc248dc17 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -1241,8 +1241,11 @@ test_set_contents_full (void)
       { EXISTING_FILE_REGULAR, 0644, FALSE, TRUE, 0 },
 #ifndef G_OS_WIN32
       { EXISTING_FILE_SYMLINK, 0644, FALSE, TRUE, 0 },
-#endif
       { EXISTING_FILE_DIRECTORY, 0644, FALSE, FALSE, G_FILE_ERROR_ISDIR },
+#else
+      /* on win32, _wopen returns EACCES if path is a directory */
+      { EXISTING_FILE_DIRECTORY, 0644, FALSE, FALSE, G_FILE_ERROR_ACCES },
+#endif
     };
   gsize i;
 


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