diff options
author | Jason Perkins <starkos@industriousone.com> | 2013-11-12 16:49:14 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2013-11-12 16:49:14 +0400 |
commit | 77f3d5249efb979be79c73a2762babab5d6d5d6d (patch) | |
tree | 402f6dc97a6bb27754fb3ec8a97ce166c5a93341 /tests | |
parent | ee42d412fa82529f388573d9d71f0cfc85fb4304 (diff) |
Fix virtual path building for patterns like "filename.*"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/project/test_vpaths.lua | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/project/test_vpaths.lua b/tests/project/test_vpaths.lua index 3055986..66322d4 100644 --- a/tests/project/test_vpaths.lua +++ b/tests/project/test_vpaths.lua @@ -5,7 +5,7 @@ -- T.project_vpaths = { } - local suite = T.project_vpaths + local suite = T.project_vpaths local project = premake.project @@ -26,7 +26,7 @@ return project.getvpath(prj, cfg.files[1]) end - + -- -- Test simple replacements -- @@ -94,7 +94,7 @@ files { "src/myproject/hello.h" } vpaths { ["Source/Headers"] = "**.h" } test.isequal("Source/Headers/hello.h", run()) - end + end function suite.MatchFilePattern_ToGroup_WithTrailingSlash() files { "src/myproject/hello.h" } @@ -106,32 +106,39 @@ files { "src/myproject/hello.h" } vpaths { ["Group/Headers"] = "**.h" } test.isequal("Group/Headers/hello.h", run()) - end + end function suite.MatchFilePattern_ToGroup_Nested() files { "src/myproject/hello.h" } vpaths { ["Headers/*"] = "**.h" } test.isequal("Headers/src/myproject/hello.h", run()) - end + end function suite.MatchFilePattern_ToGroup_Nested_OneStar() files { "src/myproject/hello.h" } vpaths { ["Headers/*"] = "**.h" } test.isequal("Headers/src/myproject/hello.h", run()) - end + end function suite.MatchFilePatternWithPath_ToGroup_Nested() files { "src/myproject/hello.h" } vpaths { ["Headers/*"] = "src/**.h" } test.isequal("Headers/myproject/hello.h", run()) - end + end + + function suite.matchBaseFileName_onWildcardExtension() + files { "hello.cpp" } + vpaths { ["Sources"] = "hello.*" } + test.isequal("Sources/hello.cpp", run()) + end + -- -- Test with project locations -- - function suite.MatchPath_OnProjectLocationSet() + function suite.MatchPath_OnProjectLocationSet() location "build" files "src/hello.h" vpaths { [""] = "src" } |