Files
Nim/tests/tools/tloadstdin.nim
Jake Leahy ec1d68fc64 Allow specifiying path to use for stdin error messages (#24595)
Implements #24569

Adds `--stdinfile` flag for specifying the file to use in place of
`stdinfile.nim` in error messages. Will enable easier integration of
tooling with nim check

(cherry picked from commit 0cba752c8a)
2025-04-14 10:52:50 +02:00

17 lines
390 B
Nim

discard """
action: "compile"
cmd: "cat $file | $nim check --stdinfile:$file -"
# Don't believe cat and pipes works on windows
disabled: "win"
"""
import std/[assertions, paths]
# Test the nimscript config is loaded
assert defined(nimscriptConfigLoaded)
assert currentSourcePath() == $(getCurrentDir()/Path"tloadstdin.nim")
{.warning: "Hello".} #[tt.Warning
^ Hello]#