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

Unified Diff: sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart

Issue 16034002: Use helper methods for running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of unnecessary RegExps in tests. Created 7 years, 7 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: sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
diff --git a/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart b/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
index 7779467b5c3a9fea6aa4409f816a11779db78827..dbbc0df245956b7d6be30738a4c316296928a034 100644
--- a/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
+++ b/sdk/lib/_internal/pub/test/install/path/path_is_file_test.dart
@@ -10,7 +10,7 @@ import '../../test_pub.dart';
main() {
initConfig();
- integration('path dependency when path is a d.file', () {
+ integration('path dependency when path is a file', () {
d.dir('foo', [
d.libDir('foo'),
d.libPubspec('foo', '0.0.1')
@@ -28,15 +28,7 @@ main() {
})
]).create();
- // 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 '$escapePath'."),
- exitCode: 1);
+ pubInstall(error: "Path dependency for package 'foo' must refer to a "
+ "directory, not a file. Was '$dummyPath'.");
});
}

Powered by Google App Engine
This is Rietveld 408576698