From b1b2dd606ba736775868853657e331f287423dee Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 30 Nov 2016 11:00:51 +0100 Subject: [PATCH] fixes #5076 --- compiler/options.nim | 3 +-- tests/modules/UpperCased.nim | 6 ++++++ tests/modules/tuppercased.nim | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/modules/UpperCased.nim create mode 100644 tests/modules/tuppercased.nim diff --git a/compiler/options.nim b/compiler/options.nim index 9edafb17a2..b04f6a9637 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -227,8 +227,7 @@ proc setDefaultLibpath*() = libpath = parentNimLibPath proc canonicalizePath*(path: string): string = - when not FileSystemCaseSensitive: result = path.expandFilename.toLowerAscii - else: result = path.expandFilename + result = path.expandFilename proc shortenDir*(dir: string): string = ## returns the interesting part of a dir diff --git a/tests/modules/UpperCased.nim b/tests/modules/UpperCased.nim new file mode 100644 index 0000000000..7beffcc5f4 --- /dev/null +++ b/tests/modules/UpperCased.nim @@ -0,0 +1,6 @@ + +# bug #5076 + +var str*: string + +UpperCased.str = "hello" diff --git a/tests/modules/tuppercased.nim b/tests/modules/tuppercased.nim new file mode 100644 index 0000000000..65f41becd0 --- /dev/null +++ b/tests/modules/tuppercased.nim @@ -0,0 +1,8 @@ +discard """ + output: "hello" +""" + +import UpperCased + +# stress normalization rules: +echo Upper_Cased.str