summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-04-12 15:48:48 +0800
committerGitHub <noreply@github.com>2022-04-12 09:48:48 +0200
commit26bcf18f918b2bcc7b6b2e230ae74d7726dca6d0 (patch)
tree49e00effc4562a3b77c4ee497bd88f2610260115 /tests
parent26acc97864ede8e19dddd52aa04e0139da356e3e (diff)
downloadNim-26bcf18f918b2bcc7b6b2e230ae74d7726dca6d0.tar.gz
fix #19680; check if stderr is static (#19709)
Diffstat (limited to 'tests')
-rw-r--r--tests/misc/tvarious1.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/tvarious1.nim b/tests/misc/tvarious1.nim
index 9c0b541db..9c912ee8e 100644
--- a/tests/misc/tvarious1.nim
+++ b/tests/misc/tvarious1.nim
@@ -46,3 +46,13 @@ echo value
 var ys = @[4.1, 5.6, 7.2, 1.7, 9.3, 4.4, 3.2]
 #var x = int(ys.high / 2) #echo ys[x] # Works
 echo ys[int(ys.high / 2)] # Doesn't work
+
+
+# bug #19680
+var here = ""
+when stderr is static:
+  doAssert false
+else:
+  here = "works"
+
+doAssert here == "works"