@@ -21,6 +21,7 @@ subroutine collect_filesystem(testsuite)
2121 new_unittest(" fs_file_not_exists" , fs_file_not_exists, should_fail= .true. ), &
2222 new_unittest(" fs_file_exists" , fs_file_exists), &
2323 new_unittest(" fs_current_dir_exists" , fs_current_dir_exists), &
24+ new_unittest(" fs_path_separator" , fs_path_separator), &
2425 new_unittest(" fs_run_invalid_command" , fs_run_invalid_command, should_fail= .true. ), &
2526 new_unittest(" fs_run_with_invalid_option" , fs_run_with_invalid_option, should_fail= .true. ), &
2627 new_unittest(" fs_run_valid_command" , fs_run_valid_command), &
@@ -80,6 +81,21 @@ subroutine fs_current_dir_exists(error)
8081 call check(error, is_existing, " Current directory should not fail." )
8182 end
8283
84+ subroutine fs_path_separator (error )
85+ type (error_type), allocatable , intent (out ) :: error
86+
87+ character (* ), parameter :: outer_dir = " path_separator_outer"
88+ character (* ), parameter :: inner_dir = " path_separator_inner"
89+
90+ call rmdir(outer_dir)
91+ call check(error, .not. exists(outer_dir), " Directory should not exist." )
92+ call mkdir(outer_dir)
93+ call check(error, exists(outer_dir), " Outer directory should now exist." )
94+ call mkdir(outer_dir// path_separator()// inner_dir)
95+ call check(error, exists(outer_dir// path_separator()// inner_dir), " Inner directory should now exist." )
96+ call rmdir(outer_dir)
97+ end
98+
8399 subroutine fs_run_invalid_command (error )
84100 type (error_type), allocatable , intent (out ) :: error
85101
0 commit comments