summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authortersec <tersec@users.noreply.github.com>2023-11-25 19:52:42 +0000
committerGitHub <noreply@github.com>2023-11-25 20:52:42 +0100
commit26f2ea149c50ebfe882560c83d1d7cf7bb9d10c4 (patch)
tree646ae75d6d726e303f62ddcc711fcc836724e338 /tests
parent379299a5ac06f67863525fe253f3de4a4e01ff01 (diff)
downloadNim-26f2ea149c50ebfe882560c83d1d7cf7bb9d10c4.tar.gz
remove unnecessary side-effects from base64.encode(mime) (#22986)
Fixes https://github.com/nim-lang/Nim/issues/22985
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tbase64.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/stdlib/tbase64.nim b/tests/stdlib/tbase64.nim
index 5739b1621..98388bb6c 100644
--- a/tests/stdlib/tbase64.nim
+++ b/tests/stdlib/tbase64.nim
@@ -53,5 +53,9 @@ template main() =
     doAssert encode("", safe = true) == ""
     doAssert encode("the quick brown dog jumps over the lazy fox", safe = true) == "dGhlIHF1aWNrIGJyb3duIGRvZyBqdW1wcyBvdmVyIHRoZSBsYXp5IGZveA=="
 
+func mainNoSideEffects() = main()
+
 static: main()
 main()
+static: mainNoSideEffects()
+mainNoSideEffects()