mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
add unsupported check in process test
This commit is contained in:
@@ -162,6 +162,8 @@ _get_platform_error :: proc(errno: linux.Errno) -> Error {
|
|||||||
return .Invalid_File
|
return .Invalid_File
|
||||||
case .ENOMEM:
|
case .ENOMEM:
|
||||||
return .Out_Of_Memory
|
return .Out_Of_Memory
|
||||||
|
case .ENOSYS:
|
||||||
|
return .Unsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
return Platform_Error(i32(errno))
|
return Platform_Error(i32(errno))
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package tests_core_os_os2
|
package tests_core_os_os2
|
||||||
|
|
||||||
import os "core:os/os2"
|
import os "core:os/os2"
|
||||||
|
import "core:log"
|
||||||
import "core:testing"
|
import "core:testing"
|
||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
@@ -11,6 +12,11 @@ test_process_exec :: proc(t: ^testing.T) {
|
|||||||
defer delete(stdout)
|
defer delete(stdout)
|
||||||
defer delete(stderr)
|
defer delete(stderr)
|
||||||
|
|
||||||
|
if err == .Unsupported {
|
||||||
|
log.warn("process_exec unsupported")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
testing.expect_value(t, state.exited, true)
|
testing.expect_value(t, state.exited, true)
|
||||||
testing.expect_value(t, state.success, true)
|
testing.expect_value(t, state.success, true)
|
||||||
testing.expect_value(t, err, nil)
|
testing.expect_value(t, err, nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user