Check file exists in {.compile.} pragma (#21105)
* Add test * Check file exists before adding it into compilation * Make error message look like other error messages i.e. following the format `error msg: file`
This commit is contained in:
parent
8054be6e52
commit
d00477dffb
2 changed files with 10 additions and 2 deletions
5
tests/pragmas/tcompile_missing_file.nim
Normal file
5
tests/pragmas/tcompile_missing_file.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
discard """
|
||||
joinable: false
|
||||
errormsg: "cannot find: noexist.c"
|
||||
"""
|
||||
{.compile: "noexist.c".}
|
||||
Loading…
Add table
Add a link
Reference in a new issue