diff options
author | Jason Perkins <starkos@industriousone.com> | 2011-07-20 02:07:30 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2011-07-20 02:07:30 +0400 |
commit | 38692f2e193c7d2ba2c463f3bcdd1e445a785f15 (patch) | |
tree | 3dce989d8d4ec7f8440728ded3142421eec64712 /tests/project | |
parent | a06602621f46f5f9e3f0144a7c73677c6872dbfa (diff) |
Flipped vpaths syntax, now ['group']={'pattern(s)'...}
Diffstat (limited to 'tests/project')
-rw-r--r-- | tests/project/test_vpaths.lua | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/tests/project/test_vpaths.lua b/tests/project/test_vpaths.lua index f4832e2..49631e2 100644 --- a/tests/project/test_vpaths.lua +++ b/tests/project/test_vpaths.lua @@ -34,28 +34,25 @@ end function suite.ReturnsOriginalPath_OnNoMatches() - vpaths { ["**.h"] = "Headers" } + vpaths { ["Headers"] = "**.h" } prepare() test.isequal("hello.c", project.getvpath(prj, "hello.c")) end - function suite.CanTrimLeadingPaths() - vpaths { ["src"] = "" } + vpaths { [""] = "src" } prepare() test.isequal("myproject/hello.c", project.getvpath(prj, "src/myproject/hello.c")) end - function suite.PatternMayIncludeTrailingSlash() - vpaths { ["src/myproject/"] = "" } + vpaths { [""] = "src/myproject/" } prepare() test.isequal("hello.c", project.getvpath(prj, "src/myproject/hello.c")) end - function suite.SimpleReplacementPatterns() - vpaths { ["src/myproject"] = "sources" } + vpaths { ["sources"] = "src/myproject" } prepare() test.isequal("sources/hello.c", project.getvpath(prj, "src/myproject/hello.c")) end @@ -66,54 +63,49 @@ -- function suite.MatchFilePattern_ToGroup_Flat() - vpaths { ["**.h"] = "Headers" } + vpaths { ["Headers"] = "**.h" } prepare() test.isequal("Headers/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePattern_ToNestedGroup_Flat() - vpaths { ["**.h"] = "Source/Headers" } + vpaths { ["Source/Headers"] = "**.h" } prepare() test.isequal("Source/Headers/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePattern_ToGroup_WithTrailingSlash() - vpaths { ["**.h"] = "Headers/" } + vpaths { ["Headers/"] = "**.h" } prepare() test.isequal("Headers/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePattern_ToNestedGroup_Flat() - vpaths { ["**.h"] = "Group/Headers" } + vpaths { ["Group/Headers"] = "**.h" } prepare() test.isequal("Group/Headers/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePattern_ToGroup_Nested() - vpaths { ["**.h"] = "Headers/**" } + vpaths { ["Headers/**"] = "**.h" } prepare() test.isequal("Headers/src/myproject/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePattern_ToGroup_Nested_OneStar() - vpaths { ["**.h"] = "Headers/*" } + vpaths { ["Headers/*"] = "**.h" } prepare() test.isequal("Headers/src/myproject/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end - function suite.MatchFilePatternWithPath_ToGroup_Nested() - vpaths { ["src/**.h"] = "Headers/**" } + vpaths { ["Headers/**"] = "src/**.h" } prepare() test.isequal("Headers/myproject/hello.h", project.getvpath(prj, "src/myproject/hello.h")) end + -- -- Test directory dot patterns -- |