diff options
Diffstat (limited to 'tests/misc/t15955.nim')
-rw-r--r-- | tests/misc/t15955.nim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/misc/t15955.nim b/tests/misc/t15955.nim new file mode 100644 index 000000000..7441e5398 --- /dev/null +++ b/tests/misc/t15955.nim @@ -0,0 +1,22 @@ +discard """ +joinable: false +""" + +import stdtest/specialpaths +import std/[osproc, strformat, os] + +const + nim = getCurrentCompilerExe() + buildLib = buildDir / "libD20220923T19380" + currentDir = splitFile(currentSourcePath).dir + file = currentDir / "m15955.nim" + main = currentDir / "m15955_main.nim" + + +proc runCmd(cmd: string) = + let (msg, code) = execCmdEx(cmd) + doAssert code == 0, msg + + +runCmd fmt"{nim} c -o:{buildLib} --nomain --nimMainPrefix:libA -f --app:staticlib {file}" +runCmd fmt"{nim} c -r {main}" |