diff options
author | starkos <none@none> | 2010-02-27 05:00:50 +0300 |
---|---|---|
committer | starkos <none@none> | 2010-02-27 05:00:50 +0300 |
commit | ec947a32fc5f4e80a7b9ec362a8f58cc21868844 (patch) | |
tree | b85ecb4d9c7c4fc06ebdfdc6c8a0f4070c5fc7b8 /tests/base | |
parent | b5a8fb5ea42f49872491d12718b09b882f6e69d7 (diff) |
Bug 2958829: Files pattern matching including too many files
Diffstat (limited to 'tests/base')
-rw-r--r-- | tests/base/test_os.lua | 6 | ||||
-rw-r--r-- | tests/base/test_path.lua | 13 |
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 + |