Skip to content

Commit b51e8f3

Browse files
author
Mikachu2333
committed
add path tests
1 parent e6ffcc1 commit b51e8f3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

test/xy.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ main (int argc, char const *argv[])
114114
assert_str (xy_normalize_path ("C:\\a bc\\def\\"), "C:\\a bc\\def\\");
115115
assert_str (xy_normalize_path ("a/b c/d"), "a\\b c\\d");
116116
assert_str (xy_normalize_path ("a/b c/d/"), "a\\b c\\d\\");
117-
//assert_str (xy_parent_dir (xy_normalize_path ("~")), "C:\\Users\\");
117+
assert_str (xy_parent_dir (xy_parent_dir (xy_normalize_path ("~/"))), "C:\\Users");
118118
}
119119
else
120120
{
@@ -129,7 +129,6 @@ main (int argc, char const *argv[])
129129
assert (xy_dir_exist ("/etc"));
130130
assert_str (xy_normalize_path ("a\\b c\\d"), "a/b c/d");
131131
assert_str (xy_normalize_path ("a\\b c\\d\\"), "a/b c/d/");
132-
//assert_str (xy_parent_dir (xy_normalize_path ("~")), "C:\\Users\\");
133132
}
134133

135134
println (xy_normalize_path (" \n ~/haha/test/123 \n\r "));
@@ -138,8 +137,8 @@ main (int argc, char const *argv[])
138137

139138
xy_succ ("测试完成", "xy.h 测试全部通过");
140139

141-
// xy_unimplemented();
142-
// xy_unsupported();
143-
// xy_unreached();
140+
// xy_unimplemented ();
141+
// xy_unsupported ();
142+
// xy_unreached ();
144143
return 0;
145144
}

0 commit comments

Comments
 (0)