Open
Description
I found this while working on #16343
3 bugs:
- only 1 nim invocation should occur
PASS: tests/compiler/tcppCompileToNamespace.nim c
is misleading because it actually uses cpp backend- if you use
nim $target
instead ofnim cpp
, the test will not honortargets: "cpp"
(and fail as expected, for reasons unrelated to this issue) and will attempt c target
Example
from tests/compiler/tcppCompileToNamespace.nim
discard """
cmd: "nim cpp --cppCompileToNamespace:foo $options -r $file"
targets: cpp
"""
import os
echo "a" / "b"
doAssert defined(cpp)
Current Output
PASS: tests/compiler/tcppCompileToNamespace.nim c ( 0.18 sec)
PASS: tests/compiler/tcppCompileToNamespace.nim cpp ( 0.17 sec)
Expected Output
PASS: tests/compiler/tcppCompileToNamespace.nim cpp ( 0.17 sec)
Additional Information
devel 1.5.1 0b73106