Remove usage of deprecated dart:io constants. (#11)
diff --git a/lib/test_process.dart b/lib/test_process.dart
index 3ee5244..cf99b09 100644
--- a/lib/test_process.dart
+++ b/lib/test_process.dart
@@ -149,7 +149,7 @@
// If the process is already dead, do nothing.
if (await _exitCodeOrNull != null) return;
- _process.kill(ProcessSignal.SIGKILL);
+ _process.kill(ProcessSignal.sigkill);
// Log output now rather than waiting for the exitCode callback so that
// it's visible even if we time out waiting for the process to die.
@@ -217,7 +217,7 @@
///
/// If this is called after the process is already dead, it does nothing.
Future kill() async {
- _process.kill(ProcessSignal.SIGKILL);
+ _process.kill(ProcessSignal.sigkill);
await exitCode;
}
diff --git a/pubspec.yaml b/pubspec.yaml
index c98deb8..212a478 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -5,7 +5,7 @@
homepage: https://github.com/dart-lang/test_process
environment:
- sdk: '>=2.0.0-dev.17.0 <2.0.0'
+ sdk: '>=2.0.0-dev.55.0 <2.0.0'
dependencies:
async: ">=1.12.0 <3.0.0"
diff --git a/test/test_process_test.dart b/test/test_process_test.dart
index 03edd26..ad728e8 100644
--- a/test/test_process_test.dart
+++ b/test/test_process_test.dart
@@ -99,12 +99,12 @@
test("signal sends a signal to the process", () async {
var process = await startDartProcess(r'''
- ProcessSignal.SIGHUP.watch().listen((_) => print("HUP"));
+ ProcessSignal.sighup.watch().listen((_) => print("HUP"));
print("ready");
''');
await expectLater(process.stdout, emits('ready'));
- process.signal(ProcessSignal.SIGHUP);
+ process.signal(ProcessSignal.sighup);
await expectLater(process.stdout, emits('HUP'));
process.kill();
}, testOn: "!windows");