diff options
author | flywind <xzsflywind@gmail.com> | 2021-04-01 14:05:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 08:05:04 +0200 |
commit | 924ab3adea30b8ffe590d1dd08cc3ff23f4881de (patch) | |
tree | 1ebd26f158ed64eb5cd567a4b697f033e3885939 /tests/misc/trunner.nim | |
parent | fe9a37f2a57d0e76984b25c3dfe0fbdc94a30d9e (diff) | |
download | Nim-924ab3adea30b8ffe590d1dd08cc3ff23f4881de.tar.gz |
fix #17190 `nimscript` now accepts arbitrary file extensions for `nim e main.customext` (#17596)
* fix #17190 * cah * merge * Update tnimscriptwithnimext.nim * Update tnimscriptwithmacro.nims * Apply suggestions from code review * Delete tnimscriptwithnimext.nim * Update tests/tools/tnimscriptwithmacro.nims * fix * fix * add a test * Apply suggestions from code review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Apply suggestions from code review * Update changelog.md Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/misc/trunner.nim')
-rw-r--r-- | tests/misc/trunner.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/misc/trunner.nim b/tests/misc/trunner.nim index a66177f28..1895eeb97 100644 --- a/tests/misc/trunner.nim +++ b/tests/misc/trunner.nim @@ -238,6 +238,15 @@ tests/newconfig/bar/mfoo.nims""".splitLines expected.add &"Hint: used config file '{b}' [Conf]\n" doAssert outp.endsWith expected, outp & "\n" & expected + block: # mfoo2.customext + let filename = testsDir / "newconfig/foo2/mfoo2.customext" + let cmd = fmt"{nim} e --hint:conf {filename}" + let (outp, exitCode) = execCmdEx(cmd, options = {poStdErrToStdOut}) + doAssert exitCode == 0 + var expected = &"Hint: used config file '{filename}' [Conf]\n" + doAssert outp.endsWith "123" & "\n" & expected + + block: # nim --eval let opt = "--hints:off" check fmt"""{nim} {opt} --eval:"echo defined(nimscript)"""".execCmdEx == ("true\n", 0) |