diff --git a/src/project/oven.lua b/src/project/oven.lua index 05c5603e..33bdc222 100755 --- a/src/project/oven.lua +++ b/src/project/oven.lua @@ -97,7 +97,7 @@ platform = cfg.platform } - filename = { filename } + filename = { filename:lower() } for _, block in ipairs(cfg.solution.blocks) do if oven.filter(block, cfg.terms, filename) then diff --git a/tests/config/test_fileconfig.lua b/tests/config/test_fileconfig.lua index 6d64c36c..d4fd9422 100644 --- a/tests/config/test_fileconfig.lua +++ b/tests/config/test_fileconfig.lua @@ -20,9 +20,9 @@ sln, prj = test.createsolution() end - local function prepare() + local function prepare(filename) local cfg = project.getconfig(prj, "Debug") - fcfg = config.getfileconfig(cfg, path.join(os.getcwd(), "hello.c")) + fcfg = config.getfileconfig(cfg, path.join(os.getcwd(), filename or "hello.c")) end @@ -115,5 +115,18 @@ prepare() test.isnil(fcfg.buildoptions) end + + +-- +-- Check case-sensitivity of file name tests. +-- + + function suite.fileMatches_onCaseMismatch() + files "Hello.c" + configuration "**/HeLLo.c" + buildoptions "-Xc" + prepare("Hello.c") + test.isequal({ "-Xc" }, fcfg.buildoptions) + end - +