@@ -34,6 +34,7 @@ class TestImportProject : public TestFixture {
3434 TEST_CASE (setDefines);
3535 TEST_CASE (setIncludePaths1);
3636 TEST_CASE (setIncludePaths2);
37+ TEST_CASE (setIncludePaths3); // macro names are case insensitive
3738 }
3839
3940 void setDefines () const {
@@ -56,7 +57,7 @@ class TestImportProject : public TestFixture {
5657 ImportProject::FileSettings fs;
5758 std::list<std::string> in;
5859 in.push_back (" ../include" );
59- std::map<std::string, std::string> variables;
60+ std::map<std::string, std::string, cppcheck::stricmp > variables;
6061 fs.setIncludePaths (" abc/def/" , in, variables);
6162 ASSERT_EQUALS (1U , fs.includePaths .size ());
6263 ASSERT_EQUALS (" abc/include/" , fs.includePaths .front ());
@@ -66,7 +67,18 @@ class TestImportProject : public TestFixture {
6667 ImportProject::FileSettings fs;
6768 std::list<std::string> in;
6869 in.push_back (" $(SolutionDir)other" );
69- std::map<std::string, std::string> variables;
70+ std::map<std::string, std::string, cppcheck::stricmp> variables;
71+ variables[" SolutionDir" ] = " c:/abc/" ;
72+ fs.setIncludePaths (" /home/fred" , in, variables);
73+ ASSERT_EQUALS (1U , fs.includePaths .size ());
74+ ASSERT_EQUALS (" c:/abc/other/" , fs.includePaths .front ());
75+ }
76+
77+ void setIncludePaths3 () const { // macro names are case insensitive
78+ ImportProject::FileSettings fs;
79+ std::list<std::string> in;
80+ in.push_back (" $(SOLUTIONDIR)other" );
81+ std::map<std::string, std::string, cppcheck::stricmp> variables;
7082 variables[" SolutionDir" ] = " c:/abc/" ;
7183 fs.setIncludePaths (" /home/fred" , in, variables);
7284 ASSERT_EQUALS (1U , fs.includePaths .size ());
0 commit comments