mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 22:35:24 +00:00
@@ -1,8 +1,13 @@
|
||||
discard """
|
||||
output: "OK"
|
||||
output: '''YQ=='''
|
||||
nimout: '''YQ=='''
|
||||
"""
|
||||
import base64
|
||||
|
||||
import base64
|
||||
static: echo encode("a")
|
||||
echo encode("a")
|
||||
|
||||
proc main() =
|
||||
doAssert encode("Hello World") == "SGVsbG8gV29ybGQ="
|
||||
doAssert encode("leasure.") == "bGVhc3VyZS4="
|
||||
@@ -54,6 +59,4 @@ proc main() =
|
||||
doAssert encode("", safe = true) == ""
|
||||
doAssert encode("the quick brown dog jumps over the lazy fox", safe = true) == "dGhlIHF1aWNrIGJyb3duIGRvZyBqdW1wcyBvdmVyIHRoZSBsYXp5IGZveA=="
|
||||
|
||||
echo "OK"
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user