summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/secure_hash.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/secure_hash.nim b/compiler/secure_hash.nim
index a2ddd02f0..3383f23a2 100644
--- a/compiler/secure_hash.nim
+++ b/compiler/secure_hash.nim
@@ -42,6 +42,11 @@ proc `==`*(a, b: SecureHash): bool =
   SHA1Digest(a) == SHA1Digest(b)
 
 
+when isMainModule:
+  let hash1 = secureHash("a93tgj0p34jagp9[agjp98ajrhp9aej]")
+  doAssert hash1 == hash1
+  doAssert parseSecureHash($hash1) == hash1
+
 
 # Copyright (c) 2011, Micael Hildenborg
 # All rights reserved.