Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1699)

Unified Diff: utils/tests/pub/install/path/path_is_file_test.dart

Issue 12263018: Fix path tests on windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Mention bug in TODO. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/tests/pub/install/path/nonexistent_dir_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
});
}
« no previous file with comments | « utils/tests/pub/install/path/nonexistent_dir_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698