mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Fix appending to c:\ or \ #2569.
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
module std::io::path @test;
|
||||
|
||||
fn void test_append()
|
||||
{
|
||||
Path p = path::new(mem, "/", POSIX)!!;
|
||||
Path p2 = p.append(mem, "hello")!!;
|
||||
test::eq(p2.str_view(), "/hello");
|
||||
p.free();
|
||||
p2.free();
|
||||
p = path::new(mem, "c:\\", WIN32)!!;
|
||||
p2 = p.append(mem, "hello")!!;
|
||||
assert(p2.str_view() == "c:\\hello");
|
||||
p.free();
|
||||
p2.free();
|
||||
}
|
||||
fn void test_dot()
|
||||
{
|
||||
Path p = path::new(mem, ".")!!;
|
||||
|
||||
Reference in New Issue
Block a user