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

Unified Diff: utils/tests/pub/install/path/nonexistent_dir_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
Index: utils/tests/pub/install/path/nonexistent_dir_test.dart
diff --git a/utils/tests/pub/install/path/nonexistent_dir_test.dart b/utils/tests/pub/install/path/nonexistent_dir_test.dart
index 324a37b3c532a8e64897b7dd4263017dec99e88c..4a129f465e36658498cbde604e031ae7320922d7 100644
--- a/utils/tests/pub/install/path/nonexistent_dir_test.dart
+++ b/utils/tests/pub/install/path/nonexistent_dir_test.dart
@@ -23,9 +23,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 = badPath.replaceAll(r"\", r"\\");
+
schedulePub(args: ['install'],
error:
- new RegExp("Could not find package 'foo' at '$badPath'."),
+ new RegExp("Could not find package 'foo' at '$escapePath'."),
exitCode: exit_codes.DATA);
});
}
« no previous file with comments | « utils/tests/pub/install/path/no_pubspec_test.dart ('k') | utils/tests/pub/install/path/path_is_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698