mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
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
17 lines
390 B
Nim
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]#
|