# # # delete "tests/spawn_redirected_hook_helper" # # delete "tests/spawn_redirected_hook_helper/__driver__.lua" # # delete "tests/spawn_redirected_hook_helper/testhooks" # # add_dir "tester-tests/running_commands" # # add_file "tester-tests/running_commands/__driver__.lua" # content [b5d965cccbfa93c14c7ec6b77d13fa8be4e6f749] # # add_file "tester-tests/running_commands/script" # content [44e229afa183a7fdfdebd3f646498ec71e1ef6b9] # ============================================================ --- tester-tests/running_commands/__driver__.lua b5d965cccbfa93c14c7ec6b77d13fa8be4e6f749 +++ tester-tests/running_commands/__driver__.lua b5d965cccbfa93c14c7ec6b77d13fa8be4e6f749 @@ -0,0 +1,15 @@ +-- verify that we can execute programs with their stdin +-- and stdout redirected from files + +get("script") + +if existsonpath("sh") then + check({"sh"}, 0, true, true, {"script"}) +elseif existsonpath("cmd") then + check({"cmd"}, 0, true, true, {"script"}) +else + check(false) +end + +data = readfile("stdout") +check(string.find(data, "fnord") ~= nil) ============================================================ --- tester-tests/running_commands/script 44e229afa183a7fdfdebd3f646498ec71e1ef6b9 +++ tester-tests/running_commands/script 44e229afa183a7fdfdebd3f646498ec71e1ef6b9 @@ -0,0 +1 @@ +echo fnord