@@ -1776,6 +1776,26 @@ static void missingHeader3()
17761776 ASSERT_EQUALS (" " , toString (outputList));
17771777}
17781778
1779+ #ifndef _WIN32
1780+ static void missingHeader4 ()
1781+ {
1782+ // this is a directory
1783+ const char code[] = " #include \" /\"\n " ;
1784+ simplecpp::OutputList outputList;
1785+ ASSERT_EQUALS (" " , preprocess (code, &outputList));
1786+ ASSERT_EQUALS (" file0,1,missing_header,Header not found: \" /\"\n " , toString (outputList));
1787+ }
1788+
1789+ static void missingHeader5 ()
1790+ {
1791+ // this is a directory
1792+ const char code[] = " #include \" /usr\"\n " ;
1793+ simplecpp::OutputList outputList;
1794+ ASSERT_EQUALS (" " , preprocess (code, &outputList));
1795+ ASSERT_EQUALS (" file0,1,missing_header,Header not found: \" /usr\"\n " , toString (outputList));
1796+ }
1797+ #endif
1798+
17791799static void nestedInclude ()
17801800{
17811801 const char code[] = " #include \" test.h\"\n " ;
@@ -2867,6 +2887,10 @@ int main(int argc, char **argv)
28672887 TEST_CASE (missingHeader1);
28682888 TEST_CASE (missingHeader2);
28692889 TEST_CASE (missingHeader3);
2890+ #ifndef _WIN32
2891+ TEST_CASE (missingHeader4);
2892+ TEST_CASE (missingHeader5);
2893+ #endif
28702894 TEST_CASE (nestedInclude);
28712895 TEST_CASE (systemInclude);
28722896
0 commit comments