File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,13 @@ main (int argc, char const *argv[])
103103 assert (xy_file_exist (xy_win_powershell_profile ));
104104 assert (true == xy_file_exist (xy_win_powershellv5_profile ));
105105 assert (xy_dir_exist ("C:\\Users" ));
106+ assert_str (xy_normalize_path ("C:\\a bc\\def\\" ), "C:\\a bc\\def\\" );
107+ assert_str (xy_normalize_path ("a/b c/d" ), "a\\b c\\d" );
108+ assert_str (xy_normalize_path ("a/b c/d/" ), "a\\b c\\d\\" );
109+ assert_str (xy_parent_dir ("a/b c/d" ), "a\\b c" );
110+ assert_str (xy_parent_dir ("a/b c\\d/" ), "a\\b c" );
111+ assert_str (xy_parent_dir (xy_normalize_path ("~/" )), "C:\\Users" );
112+ assert_str (xy_parent_dir (xy_normalize_path ("~" )), "C:\\Users" );
106113 }
107114 else
108115 {
@@ -115,6 +122,8 @@ main (int argc, char const *argv[])
115122 assert (xy_file_exist (xy_bashrc ));
116123 }
117124 assert (xy_dir_exist ("/etc" ));
125+ assert_str (xy_normalize_path ("a\\b c\\d" ), "a/b c/d" );
126+ assert_str (xy_normalize_path ("a\\b c\\d\\" ), "a/b c/d/" );
118127 }
119128
120129 println (xy_normalize_path (" \n ~/haha/test/123 \n\r " ));
You can’t perform that action at this time.
0 commit comments