Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2011-03-23 23:38:40 +0300
committerJason Perkins <starkos@industriousone.com>2011-03-23 23:38:40 +0300
commit7b0636f9999f4a4f79fec42b53a6b70db503c6de (patch)
treec413b80de855a497f581c213f69b2df1743866ab /tests/base
parented13aaeacfcac0d1066ffaefac59e235a5947207 (diff)
[#3232160] Environment variables are cut off
Diffstat (limited to 'tests/base')
-rw-r--r--tests/base/test_path.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/base/test_path.lua b/tests/base/test_path.lua
index 4a6580c..376c21e 100644
--- a/tests/base/test_path.lua
+++ b/tests/base/test_path.lua
@@ -30,6 +30,19 @@
test.isequal(expected, path.getabsolute("a/b/c/"))
end
+ function suite.getabsolute_OnLeadingEnvVar()
+ test.isequal("$(HOME)/user", path.getabsolute("$(HOME)/user"))
+ end
+
+ function suite.getabsolute_OnMultipleEnvVar()
+ test.isequal("$(HOME)/$(USER)", path.getabsolute("$(HOME)/$(USER)"))
+ end
+
+ function suite.getabsolute_OnTrailingEnvVar()
+ local expected = path.translate(os.getcwd(), "/") .. "/home/$(USER)"
+ test.isequal(expected, path.getabsolute("home/$(USER)"))
+ end
+
--
-- path.getbasename() tests