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

Side by Side Diff: sdk/lib/_internal/pub/test/run/forwards_signal_posix_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:io';
6
7 import '../descriptor.dart' as d;
8 import '../test_pub.dart';
9
10 const _catchableSignals = const [
11 ProcessSignal.SIGHUP,
12 ProcessSignal.SIGTERM,
13 ProcessSignal.SIGUSR1,
14 ProcessSignal.SIGUSR2,
15 ProcessSignal.SIGWINCH,
16 ];
17
18 const SCRIPT = """
19 import 'dart:io';
20
21 main() {
22 ProcessSignal.SIGHUP.watch().first.then(print);
23 ProcessSignal.SIGTERM.watch().first.then(print);
24 ProcessSignal.SIGUSR1.watch().first.then(print);
25 ProcessSignal.SIGUSR2.watch().first.then(print);
26 ProcessSignal.SIGWINCH.watch().first.then(print);
27
28 print("ready");
29 }
30 """;
31
32 main() {
33 initConfig();
34 integration('forwards signals to the inner script', () {
35 d.dir(appPath, [
36 d.appPubspec(),
37 d.dir("bin", [
38 d.file("script.dart", SCRIPT)
39 ])
40 ]).create();
41
42 var pub = pubRun(args: ["bin/script"]);
43
44 pub.stdout.expect("ready");
45 for (var signal in _catchableSignals) {
46 pub.signal(signal);
47 pub.stdout.expect(signal.toString());
48 }
49
50 pub.kill();
51 });
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698