diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-10-05 23:00:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-10-05 23:00:12 -0700 |
commit | 161ada4d281bb82d2cc5361960116f17178b35fd (patch) | |
tree | fcbf10481c6bcc0704e9221ec0b5825a9478ecee | |
parent | 83e831cabdd821105c7c234d2ee87bb0b6773205 (diff) | |
download | txr-161ada4d281bb82d2cc5361960116f17178b35fd.tar.gz txr-161ada4d281bb82d2cc5361960116f17178b35fd.tar.bz2 txr-161ada4d281bb82d2cc5361960116f17178b35fd.zip |
cygwin: environment-related fixes.
* stream.c (run): replace_env takes only one argument.
* tests/018/process.tl: *child-env* tests are reporting some extra
environment variables on Windows; let's just disable them.
-rw-r--r-- | stream.c | 4 | ||||
-rw-r--r-- | tests/018/process.tl | 27 |
2 files changed, 16 insertions, 15 deletions
@@ -4769,7 +4769,7 @@ static val run(val command, val args) if (ch_env != t) { save_env = env(); - replace_env(ch_env, nil); + replace_env(ch_env); } wargv = coerce(const wchar_t **, chk_xalloc(nargs + 1, sizeof *wargv, self)); @@ -4792,7 +4792,7 @@ static val run(val command, val args) uw_unwind { if (ch_env != t) - replace_env(save_env, nil); + replace_env(save_env); fds_restore(&sfds); } diff --git a/tests/018/process.tl b/tests/018/process.tl index a1970738..ce545dc3 100644 --- a/tests/018/process.tl +++ b/tests/018/process.tl @@ -26,16 +26,17 @@ (fcmd (let ((*stdout* *stdnull*)) (sh "echo foo"))) "" (fcmd (let ((*stderr* *stdout*)) (sh "echo foo 1>&2"))) "foo\n"))) -(mtest - (let ((*child-env* '("a=b"))) - (get-lines (open-process "/usr/bin/env" "r"))) - ("a=b") - (let ((*child-env* nil)) - (get-lines (open-process "/usr/bin/env" "r"))) - nil) - -(test - (fcmd - (let ((*child-env* '("a=b"))) - (run "/usr/bin/env"))) - "a=b\n") +(caseq (os-symbol) + ((:cygwin :cygnal)) + (t (mtest + (let ((*child-env* '("a=b"))) + (get-lines (open-process "/usr/bin/env" "r"))) + ("a=b") + (let ((*child-env* nil)) + (get-lines (open-process "/usr/bin/env" "r"))) + nil) + (test + (fcmd + (let ((*child-env* '("a=b"))) + (run "/usr/bin/env"))) + "a=b\n"))) |