use -r:off for runnableExamples that should compile but not run (#17203)
* use -r:off for runnableExamples that should compile but not run * use -r:off in other RT disabled tests
This commit is contained in:
parent
aef55a7a88
commit
dd6b0f81ef
5 changed files with 38 additions and 42 deletions
|
|
@ -13,15 +13,14 @@
|
|||
## is used. This suffices because Windows' console already provides the
|
||||
## wanted functionality.
|
||||
|
||||
runnableExamples:
|
||||
if false:
|
||||
echo readLineFromStdin("Is Nim awesome? (Y/n): ")
|
||||
var line: string
|
||||
while true:
|
||||
let ok = readLineFromStdin("How are you? ", line)
|
||||
if not ok: break # ctrl-C or ctrl-D will cause a break
|
||||
if line.len > 0: echo line
|
||||
echo "exiting"
|
||||
runnableExamples("-r:off"):
|
||||
echo readLineFromStdin("Is Nim awesome? (Y/n): ")
|
||||
var line: string
|
||||
while true:
|
||||
let ok = readLineFromStdin("How are you? ", line)
|
||||
if not ok: break # ctrl-C or ctrl-D will cause a break
|
||||
if line.len > 0: echo line
|
||||
echo "exiting"
|
||||
|
||||
when defined(windows):
|
||||
proc readLineFromStdin*(prompt: string): string {.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue