mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 18:54:12 +00:00
posix/os2: fix test and add back in removed temp guard
This commit is contained in:
@@ -147,6 +147,8 @@ _cleanpath_from_handle_u16 :: proc(f: ^File) -> ([]u16, Error) {
|
||||
return nil, _get_platform_error()
|
||||
}
|
||||
|
||||
TEMP_ALLOCATOR_GUARD()
|
||||
|
||||
buf := make([]u16, max(n, 260)+1, temp_allocator())
|
||||
n = win32.GetFinalPathNameByHandleW(h, raw_data(buf), u32(len(buf)), 0)
|
||||
return _cleanpath_strip_prefix(buf[:n]), nil
|
||||
|
||||
@@ -196,11 +196,6 @@ test_monetary :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_stat :: proc(t: ^testing.T) {
|
||||
testing.expect_value(t, posix.S_IRWXU, transmute(posix.mode_t)posix._mode_t(posix._S_IRWXU))
|
||||
testing.expect_value(t, posix.S_IRWXG, transmute(posix.mode_t)posix._mode_t(posix._S_IRWXG))
|
||||
testing.expect_value(t, posix.S_IRWXO, transmute(posix.mode_t)posix._mode_t(posix._S_IRWXO))
|
||||
testing.expect_value(t, posix._S_IFMT, transmute(posix.mode_t)posix._mode_t(posix.__S_IFMT))
|
||||
|
||||
stat: posix.stat_t
|
||||
testing.expect_value(t, posix.stat(#file, &stat), posix.result.OK)
|
||||
testing.expect(t, posix.S_ISREG(stat.st_mode))
|
||||
|
||||
Reference in New Issue
Block a user