diff --git a/config/nim.cfg b/config/nim.cfg index 1e4bc7b2459a9..bbfac1f313319 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -76,6 +76,7 @@ path="$lib/pure" debugger:off line_dir:off opt:speed + define:release @end @if false: # not danger: # this does not work yet. diff --git a/tests/misc/tdangerisrelease.nim b/tests/misc/tdangerisrelease.nim new file mode 100644 index 0000000000000..d2f9df090d277 --- /dev/null +++ b/tests/misc/tdangerisrelease.nim @@ -0,0 +1,13 @@ +discard """ + cmd: "nim c -d:danger -r $file" + output: ''' +a +b +c +''' +""" + +echo "a" +when defined(release): + echo "b" +echo "c"