mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 08:04:07 +00:00
19 lines
461 B
Odin
19 lines
461 B
Odin
package tests_core_os_os2
|
|
|
|
import os "core:os/os2"
|
|
import "core:testing"
|
|
|
|
@(test)
|
|
test_process_exec :: proc(t: ^testing.T) {
|
|
state, stdout, stderr, err := os.process_exec({
|
|
command = {"echo", "hellope"},
|
|
}, context.allocator)
|
|
defer delete(stdout)
|
|
defer delete(stderr)
|
|
|
|
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")
|
|
}
|