+ "-I$dir dir=$dir", '');
+
+# Find the default .INCLUDE_DIRS
+create_file('defaultdirs.mk', "\$(info \$(.INCLUDE_DIRS))\nall:;\@:\n");
+my $cmd = subst_make_string("#MAKEPATH# -f defaultdirs.mk");
+my @dirs = `$cmd`;
+my $dirs = $dirs[0];
+chomp $dirs;
+unlink('defaultdirs.mk');
+
+run_make_test("
+ifneq (\$(.INCLUDE_DIRS),$dirs)
+\$(warning Mismatched \$(.INCLUDE_DIRS) != $dirs)
+endif
+all:;\@:
+",
+ '', '');
+
+# Verify that -I- disables content from .INCLUDE_DIRS
+
+run_make_test(q/
+ifneq ($(.INCLUDE_DIRS),)
+$(warning Mismatched $(.INCLUDE_DIRS) != )
+endif
+all:;@:
+/,
+ '-I-', '');
+
+# Prefix -I dirs to the front
+mkdir('somedir', 0777);
+
+my $xdirs = $dirs ? " $dirs" : '';
+run_make_test("
+ifneq (\$(.INCLUDE_DIRS),somedir$xdirs)
+\$(warning Mismatched '\$(.INCLUDE_DIRS)' != 'somedir$xdirs')
+endif
+all:;\@:
+",
+ '-I somedir', '');
+
+# Verify .INCLUDE_DIRS contains files after -I-
+
+run_make_test(q/
+ifneq ($(.INCLUDE_DIRS),somedir)
+$(warning Mismatched $(.INCLUDE_DIRS) != somedir)
+endif
+all:;@:
+/,
+ '-I - -I somedir', '');