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

Side by Side Diff: test/runner/pause_after_load_test.dart

Issue 1258113004: Fix --pause-after-load with a pattern. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « lib/src/backend/suite.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:scheduled_test/descriptor.dart' as d; 10 import 'package:scheduled_test/descriptor.dart' as d;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 test.stdout.expect(consumeThrough(inOrder([ 227 test.stdout.expect(consumeThrough(inOrder([
228 "The test runner is paused. Open the dev console in Dartium and set " 228 "The test runner is paused. Open the dev console in Dartium and set "
229 "breakpoints. Once you're", 229 "breakpoints. Once you're",
230 "finished, return to this terminal and press Enter." 230 "finished, return to this terminal and press Enter."
231 ]))); 231 ])));
232 232
233 test.signal(ProcessSignal.SIGTERM); 233 test.signal(ProcessSignal.SIGTERM);
234 test.shouldExit(); 234 test.shouldExit();
235 test.stderr.expect(isDone); 235 test.stderr.expect(isDone);
236 }, testOn: "!windows"); 236 }, testOn: "!windows");
237
238 // Regression test for #304.
239 test("supports test name patterns", () {
240 d.file("test.dart", """
241 import 'package:test/test.dart';
242
243 void main() {
244 print('loaded test 1!');
245
246 test("failure 1", () {});
247 test("success", () {});
248 test("failure 2", () {});
237 } 249 }
250 """).create();
251
252 var test = runTest(
253 ["--pause-after-load", "-p", "dartium", "-n", "success", "test.dart"]);
254 test.stdout.expect(consumeThrough("loaded test 1!"));
255 test.stdout.expect(consumeThrough(inOrder([
256 "The test runner is paused. Open the dev console in Dartium and set "
257 "breakpoints. Once you're",
258 "finished, return to this terminal and press Enter."
259 ])));
260
261 schedule(() async {
262 var nextLineFired = false;
263 test.stdout.next().then(expectAsync((line) {
264 expect(line, contains("+0: success"));
265 nextLineFired = true;
266 }));
267
268 // Wait a little bit to be sure that the tests don't start running without
269 // our input.
270 await new Future.delayed(new Duration(seconds: 2));
271 expect(nextLineFired, isFalse);
272 });
273
274 test.writeLine('');
275 test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
276 test.shouldExit(0);
277 });
278 }
OLDNEW
« no previous file with comments | « lib/src/backend/suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698