Index: utils/tests/pub/install/path/path_is_file_test.dart |
diff --git a/utils/tests/pub/install/path/path_is_file_test.dart b/utils/tests/pub/install/path/path_is_file_test.dart |
index 56218367f98f7066ad1a68378d01817cb35693c6..8717b49e56080286e8115059b49ed38d7ec10313 100644 |
--- a/utils/tests/pub/install/path/path_is_file_test.dart |
+++ b/utils/tests/pub/install/path/path_is_file_test.dart |
@@ -27,9 +27,15 @@ main() { |
}) |
]).scheduleCreate(); |
+ // TODO(rnystrom): The "\" in a Windows path gets treated like a regex |
+ // character, so hack escape. A better fix is to use a literal string |
+ // instead of a RegExp to validate, but that requires us to move the |
+ // stack traces out of the stderr when we invoke pub. See also: #4706. |
+ var escapePath = dummyPath.replaceAll(r"\", r"\\"); |
+ |
schedulePub(args: ['install'], |
error: new RegExp("Path dependency for package 'foo' must refer to a " |
- "directory, not a file. Was '$dummyPath'."), |
+ "directory, not a file. Was '$escapePath'."), |
exitCode: exit_codes.DATA); |
}); |
} |