# # # add_dir "tests/spawn_redirected_hook_helper" # # add_file "tests/spawn_redirected_hook_helper/__driver__.lua" # content [7510e5e9d34dc9e063bbc33018ce2ea8e86f3c2a] # # add_file "tests/spawn_redirected_hook_helper/testhooks" # content [ca2591f01fbf45e890056734ef35209852b6d2fd] # # patch "ChangeLog" # from [eaaa36441ad0b61d910905fd7be45682ae96e165] # to [09e04edc1d9acf5a39c15f5b6d5d905ed8731d4c] # # patch "testsuite.lua" # from [d101fb0922ad9a24877a4bf3636466738bf782e9] # to [69e0a1f973ae6482df199669e0fc61d724e05c43] # ============================================================ --- tests/spawn_redirected_hook_helper/__driver__.lua 7510e5e9d34dc9e063bbc33018ce2ea8e86f3c2a +++ tests/spawn_redirected_hook_helper/__driver__.lua 7510e5e9d34dc9e063bbc33018ce2ea8e86f3c2a @@ -0,0 +1,8 @@ + +mtn_setup() + +check(get("testhooks")) + +check(raw_mtn("--rcfile=testhooks", "ls", "unknown"), 0, false, false) +skip_if(exists("skipfile")) +check(exists("outfile")) ============================================================ --- tests/spawn_redirected_hook_helper/testhooks ca2591f01fbf45e890056734ef35209852b6d2fd +++ tests/spawn_redirected_hook_helper/testhooks ca2591f01fbf45e890056734ef35209852b6d2fd @@ -0,0 +1,24 @@ +function ignore_file (name) + ok = true + + if ok then + if existsonpath("touch") == 0 then + pid = spawn_redirected ("", "", "xyzzy", "touch", "foofile") + if pid == -1 then ok = false end + elseif existsonpath("xcopy") == 0 then + pid = spawn_redirected ("", "", "xyzzy", "xcopy") + if pid == -1 then ok = false end + else + x = io.open("skipfile", "w") + x:close() + end + end + + if ok then + x = io.open("outfile", "w") + x:close() + end + + ignore_file = function (name) return true end +return true +end ============================================================ --- ChangeLog eaaa36441ad0b61d910905fd7be45682ae96e165 +++ ChangeLog 09e04edc1d9acf5a39c15f5b6d5d905ed8731d4c @@ -1,5 +1,10 @@ 2006-11-17 Timothy Brownawell + Make spawn_redirected work with blank filenames to not redirect + some streams. + +2006-11-17 Timothy Brownawell + Add status code reporting to the note_netsync_{begin,end} hooks. 2006-11-16 Richard Levitte ============================================================ --- testsuite.lua d101fb0922ad9a24877a4bf3636466738bf782e9 +++ testsuite.lua 69e0a1f973ae6482df199669e0fc61d724e05c43 @@ -690,3 +690,4 @@ table.insert(tests, "automate_stdio_opti table.insert(tests, "automate_content_diff") table.insert(tests, "netsync_hook_errcodes") table.insert(tests, "automate_stdio_options") +table.insert(tests, "spawn_redirected_hook_helper")