summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2018-05-05 21:14:48 +0100
committerDominik Picheta <dominikpicheta@gmail.com>2018-06-17 23:26:18 +0100
commit03b073d541e899585951fb51896ce4440f94387b (patch)
tree9f07c9ce993dd2c5088ca18e6e699ba887abb044
parent9e8623785577aff8ecffaea27f8cdc0d98c1edb1 (diff)
downloadNim-03b073d541e899585951fb51896ce4440f94387b.tar.gz
Workaround VM bug in strutils
-rw-r--r--lib/pure/strutils.nim5
-rw-r--r--tests/testament/categories.nim4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index 055e91faf..ab34a0b2d 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -17,8 +17,9 @@ import parseutils
 from math import pow, round, floor, log10
 from algorithm import reverse
 
-from unicode import toLower, toUpper
-export toLower, toUpper
+when defined(nimVmExportFixed):
+  from unicode import toLower, toUpper
+  export toLower, toUpper
 
 {.deadCodeElim: on.}  # dce option deprecated
 
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim
index f513090a4..9affbc159 100644
--- a/tests/testament/categories.nim
+++ b/tests/testament/categories.nim
@@ -293,13 +293,13 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) =
   # Verify that the files have not been modified. Death shall fall upon
   # whoever edits these hashes without dom96's permission, j/k. But please only
   # edit when making a conscious breaking change, also please try to make your
-  # commit message clear so I can easily compile an errata later.
+  # commit message clear and notify me so I can easily compile an errata later.
   var testHashes: seq[string] = @[]
 
   for test in tests:
     testHashes.add(getMD5(readFile("tests" / test.addFileExt("nim")).string))
 
-  let refHashes = @[
+  const refHashes = @[
     "51afdfa84b3ca3d810809d6c4e5037ba", "30f07e4cd5eaec981f67868d4e91cfcf",
     "d14e7c032de36d219c9548066a97e846", "2e40bfd5daadb268268727da91bb4e81",
     "c5d3853ed0aba04bf6d35ba28a98dca0", "058603145ff92d46c009006b06e5b228",