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

Unified Diff: tests/standalone/io/signal_test_script.dart

Issue 163273002: Add signal test for each supported signal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tests/standalone/io/signals_test.dart » ('j') | tests/standalone/io/signals_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/signal_test_script.dart
diff --git a/tests/standalone/io/signal_test_script.dart b/tests/standalone/io/signal_test_script.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7f43c5a2bae9616b3db0ffc6a6eb9117d5407a1b
--- /dev/null
+++ b/tests/standalone/io/signal_test_script.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io";
+
+void main(args) {
+ var signal;
+ switch (args[0]) {
+ case 'SIGHUP': signal = ProcessSignal.SIGHUP; break;
+ case 'SIGINT': signal = ProcessSignal.SIGINT; break;
+ case 'SIGTERM': signal = ProcessSignal.SIGTERM; break;
+ case 'SIGUSR1': signal = ProcessSignal.SIGUSR1; break;
+ case 'SIGUSR2': signal = ProcessSignal.SIGUSR2; break;
+ case 'SIGWINCH': signal = ProcessSignal.SIGWINCH; break;
+ }
+ signal.watch().first.then((s) {
+ if (signal != s) exit(1);
+ if (signal.toString() != args[0]) exit(1);
+ print('got signal');
+ });
+ print("ready");
+}
+
« no previous file with comments | « no previous file | tests/standalone/io/signals_test.dart » ('j') | tests/standalone/io/signals_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698