diff options
author | alaviss <alaviss@users.noreply.github.com> | 2019-01-08 18:41:15 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-08 12:41:15 +0100 |
commit | 6737634d88a70a3d87774c9f51f2ac6d2bf4da4f (patch) | |
tree | 695c837a0cae6f6344635bc91216aa5a61c0c380 /tests/stdlib/t10231.nim | |
parent | 821920aa391c1361ee17befedf4452edba47c87c (diff) | |
download | Nim-6737634d88a70a3d87774c9f51f2ac6d2bf4da4f.tar.gz |
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.
Diffstat (limited to 'tests/stdlib/t10231.nim')
-rw-r--r-- | tests/stdlib/t10231.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/t10231.nim b/tests/stdlib/t10231.nim new file mode 100644 index 000000000..5d1101aa4 --- /dev/null +++ b/tests/stdlib/t10231.nim @@ -0,0 +1,13 @@ +discard """ + target: cpp + action: run + exitcode: 0 +""" + +import os + +if paramCount() == 0: + # main process + doAssert execShellCmd(getAppFilename().quoteShell & " test") == 1 +else: + quit 1 |