Nim/tests/stdlib/t10231.nim
alaviss 6737634d88 os.execShellCmd: fixes #10231 (#10232)
Darwin has long deprecated the wait union, but their macros still assume
it unless you define _POSIX_C_SOURCE. This trips up C++ compilers.

This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE
is defined.
2019-01-08 12:41:15 +01:00

13 lines
192 B
Nim

discard """
target: cpp
action: run
exitcode: 0
"""
import os
if paramCount() == 0:
# main process
doAssert execShellCmd(getAppFilename().quoteShell & " test") == 1
else:
quit 1