@@ -1776,6 +1776,26 @@ static void missingHeader3()
1776
1776
ASSERT_EQUALS (" " , toString (outputList));
1777
1777
}
1778
1778
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
+
1779
1799
static void nestedInclude ()
1780
1800
{
1781
1801
const char code[] = " #include \" test.h\"\n " ;
@@ -2867,6 +2887,10 @@ int main(int argc, char **argv)
2867
2887
TEST_CASE (missingHeader1);
2868
2888
TEST_CASE (missingHeader2);
2869
2889
TEST_CASE (missingHeader3);
2890
+ #ifndef _WIN32
2891
+ TEST_CASE (missingHeader4);
2892
+ TEST_CASE (missingHeader5);
2893
+ #endif
2870
2894
TEST_CASE (nestedInclude);
2871
2895
TEST_CASE (systemInclude);
2872
2896
0 commit comments