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

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstarkos <none@none>2010-02-27 05:00:50 +0300
committerstarkos <none@none>2010-02-27 05:00:50 +0300
commitec947a32fc5f4e80a7b9ec362a8f58cc21868844 (patch)
treeb85ecb4d9c7c4fc06ebdfdc6c8a0f4070c5fc7b8 /tests/base
parentb5a8fb5ea42f49872491d12718b09b882f6e69d7 (diff)
Bug 2958829: Files pattern matching including too many files
Diffstat (limited to 'tests/base')
-rw-r--r--tests/base/test_os.lua6
-rw-r--r--tests/base/test_path.lua13
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/base/test_os.lua b/tests/base/test_os.lua
index 0d67ea6..1fce260 100644
--- a/tests/base/test_os.lua
+++ b/tests/base/test_os.lua
@@ -67,6 +67,12 @@
local result = os.matchfiles("./**.lua")
test.istrue(table.contains(result, "folder/ok.lua"))
end
+
+ function suite.matchfiles_OnImplicitEndOfString()
+ local result = os.matchfiles("folder/*.lua")
+ test.istrue(table.contains(result, "folder/ok.lua"))
+ test.isfalse(table.contains(result, "folder/ok.lua.2"))
+ end
diff --git a/tests/base/test_path.lua b/tests/base/test_path.lua
index fc592cf..c2d1be7 100644
--- a/tests/base/test_path.lua
+++ b/tests/base/test_path.lua
@@ -1,7 +1,7 @@
--
-- tests/base/test_path.lua
-- Automated test suite for the action list.
--- Copyright (c) 2008,2009 Jason Perkins and the Premake project
+-- Copyright (c) 2008-2010 Jason Perkins and the Premake project
--
T.path = { }
@@ -195,3 +195,14 @@
test.isequal("dir/dir/file", actual)
end
end
+
+
+--
+-- path.wildcards tests
+--
+
+ function suite.wildcards_MatchesTrailingStar()
+ local p = path.wildcards("**/xcode/*")
+ test.isequal(".*/xcode/[^/]*", p)
+ end
+