mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
enable test on bsds
This commit is contained in:
@@ -1,13 +1,8 @@
|
|||||||
package tests_core_os_os2
|
package tests_core_os_os2
|
||||||
|
|
||||||
import "base:runtime"
|
|
||||||
|
|
||||||
import "core:log"
|
|
||||||
import os "core:os/os2"
|
import os "core:os/os2"
|
||||||
import "core:testing"
|
import "core:testing"
|
||||||
|
|
||||||
_ :: log
|
|
||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
test_process_exec :: proc(t: ^testing.T) {
|
test_process_exec :: proc(t: ^testing.T) {
|
||||||
state, stdout, stderr, err := os.process_exec({
|
state, stdout, stderr, err := os.process_exec({
|
||||||
@@ -16,13 +11,8 @@ test_process_exec :: proc(t: ^testing.T) {
|
|||||||
defer delete(stdout)
|
defer delete(stdout)
|
||||||
defer delete(stderr)
|
defer delete(stderr)
|
||||||
|
|
||||||
when (ODIN_OS not_in runtime.Odin_OS_Types{.Linux, .Darwin, .Windows}) {
|
testing.expect_value(t, state.exited, true)
|
||||||
testing.expect_value(t, err, os.General_Error.Unsupported)
|
testing.expect_value(t, state.success, true)
|
||||||
_ = state
|
testing.expect_value(t, err, nil)
|
||||||
} else {
|
testing.expect_value(t, string(stdout), "hellope\n")
|
||||||
testing.expect_value(t, state.exited, true)
|
|
||||||
testing.expect_value(t, state.success, true)
|
|
||||||
testing.expect_value(t, err, nil)
|
|
||||||
testing.expect_value(t, string(stdout), "hellope\n")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user