Skip to content

Commit

Permalink
Test fix on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
shirok committed Sep 27, 2024
1 parent 69cb8f5 commit e1dd93d
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions ext/gauche/test-process.scm
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,29 @@
)
(equal? s s1)))

(test* "run-process (environment)" '()
(cond-expand
[gauche.os.windows
;; TRANSIENT: Remove this cond-expand once we implement :environment
;; on windows.
]
[else
;; Quirk: OSX adds __CF_USER_TEXT_ENCODING env var unconditionally.
(test* "run-process (environment)" '()
(let* ((p (run-process (cmd "env") :output :pipe
:environment '()))
(in (process-output p))
(s (port->string-list in))
(x (process-wait p)))
s))

(test* "run-process (environment)" '("FOO=BAR")
(let* ((p (run-process (cmd "env") :output :pipe
:environment '("FOO=BAR")))
(in (process-output p))
(s (port->string-list in))
(x (process-wait p)))
s))
(remove #/^__CF_USER_TEXT_ENCODING=/ s)))

(test* "run-process (environment)" '("FOO=BAR")
(let* ((p (run-process (cmd "env") :output :pipe
:environment '("FOO=BAR")))
(in (process-output p))
(s (port->string-list in))
(x (process-wait p)))
(remove #/^__CF_USER_TEXT_ENCODING=/ s)))
])

(test* "do-process :on-abnormal-exit #f" #f
(do-process (cmd "cat" "NoSuchFile") :output :null :error :null))
Expand Down

0 comments on commit e1dd93d

Please sign in to comment.