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

Unified Diff: sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart

Issue 164773003: Change ScheduledProcess's output streams over to be ScheduledStreams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 | « sdk/lib/_internal/pub/test/serve/utils.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart b/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart
index e77af93391e3367b814c17ab9fb7614a50c506e1..2f0cfe63a59812d1f644772a59f7a13a204aae28 100644
--- a/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart
@@ -5,6 +5,7 @@
library pub_tests;
import 'package:path/path.dart' as path;
+import 'package:scheduled_test/scheduled_stream.dart';
import 'package:scheduled_test/scheduled_test.dart';
import '../../lib/src/utils.dart';
@@ -16,7 +17,7 @@ getWarningRegExp(String assetsPath) {
// Escape backslashes since they are metacharacters in a regex.
assetsPath = quoteRegExp(assetsPath);
return new RegExp(
- '^Warning: Pub reserves paths containing "assets" for using assets from '
+ r'^Warning: Pub reserves paths containing "assets" for using assets from '
'packages\\. Please rename the path "$assetsPath"\\.\$');
}
@@ -37,8 +38,7 @@ main() {
endPubServe();
var assetsPath = path.join('web', 'assets');
- expect(pub.remainingStderr(), completion(
- matches(getWarningRegExp(assetsPath))));
+ pub.stderr.expect(consumeThrough(matches(getWarningRegExp(assetsPath))));
});
integration('warns user about assets dir nested anywhere in "web"', () {
@@ -57,8 +57,7 @@ main() {
endPubServe();
var assetsPath = path.join('web', 'foo', 'assets');
- expect(pub.remainingStderr(), completion(
- matches(getWarningRegExp(assetsPath))));
+ pub.stderr.expect(consumeThrough(matches(getWarningRegExp(assetsPath))));
});
integration('warns user about assets file in the root of "web"', () {
@@ -75,8 +74,7 @@ main() {
endPubServe();
var assetsPath = path.join('web', 'assets');
- expect(pub.remainingStderr(), completion(
- matches(getWarningRegExp(assetsPath))));
+ pub.stderr.expect(consumeThrough(matches(getWarningRegExp(assetsPath))));
});
integration('warns user about assets file nested anywhere in "web"', () {
@@ -95,8 +93,7 @@ main() {
endPubServe();
var assetsPath = path.join('web', 'foo', 'assets');
- expect(pub.remainingStderr(), completion(
- matches(getWarningRegExp(assetsPath))));
+ pub.stderr.expect(consumeThrough(matches(getWarningRegExp(assetsPath))));
});
integration('does not warn if no assets dir or file anywhere in "web"', () {
@@ -112,7 +109,7 @@ main() {
waitForBuildSuccess();
endPubServe();
- expect(pub.remainingStderr(), completion(
- matches(r'^(?!Warning: Pub reserves paths containing "assets").*$')));
+ pub.stderr.expect(never(startsWith('Warning: Pub reserves paths containing '
+ '"assets"')));
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/utils.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698