diff options
author | Jason Perkins <starkos@industriousone.com> | 2011-08-23 00:35:51 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2011-08-23 00:35:51 +0400 |
commit | e78d5c2a16345b36f92fabccd3efd80742bc21b1 (patch) | |
tree | 89e85063611a6f2cdbc4a47e242fbadd526543cb /tests | |
parent | 4963e4d3a67a4cee49b192076962a856e6473801 (diff) |
Fixed #3381011: location breaks vpaths
Diffstat (limited to 'tests')
-rw-r--r-- | tests/project/test_vpaths.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/project/test_vpaths.lua b/tests/project/test_vpaths.lua index 49631e2..8616907 100644 --- a/tests/project/test_vpaths.lua +++ b/tests/project/test_vpaths.lua @@ -124,3 +124,32 @@ prepare() test.isequal("src/hello.c", project.getvpath(prj, "../../src/hello.c")) end + + +-- +-- Test with project locations +-- + + function suite.MatchPath_OnProjectLocationSet() + location "build" + files "src/hello.h" + vpaths { [""] = "src" } + prepare() + test.isequal("hello.h", project.getvpath(prj, prj.files[1])) + end + + function suite.MatchFilePattern_OnProjectLocationSet() + location "build" + files "src/hello.h" + vpaths { ["Headers"] = "**.h" } + prepare() + test.isequal("Headers/hello.h", project.getvpath(prj, prj.files[1])) + end + + function suite.MatchFilePatternWithPath_OnProjectLocationSet() + location "build" + files "src/hello.h" + vpaths { ["Headers"] = "src/**.h" } + prepare() + test.isequal("Headers/hello.h", project.getvpath(prj, prj.files[1])) + end |