diff libinterp/corefcn/dirfns.cc @ 31028:509ba2cc30ec

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 26 May 2022 13:31:57 +0200
parents d07218f22447 72786e150001
children e88a07dec498
line wrap: on
line diff
--- a/libinterp/corefcn/dirfns.cc	Wed May 25 17:58:13 2022 -0400
+++ b/libinterp/corefcn/dirfns.cc	Thu May 26 13:31:57 2022 +0200
@@ -565,6 +565,15 @@
 %! assert (result1, {"file1"; "myfile1"});
 %! assert (result2, {"myfile1"});
 %! assert (result3, {"file1"; "file2"});
+
+## Check backslash handling on Windows
+%!testif ; ispc ()
+%! win_dir = getenv ("WINDIR");
+%! assert (glob (win_dir), {win_dir});
+%! assert (glob ([win_dir, filesep]), {[win_dir, filesep]});
+%! win_dir2 = strrep(win_dir, filesep, '/');
+%! assert (glob (win_dir2), {win_dir});
+%! assert (glob ([win_dir2, '/']), {[win_dir, filesep]});
 */
 
 DEFUN (__wglob__, args, ,