Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Remove usage of deprecated dart:io constants. #11

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/test_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class TestProcess {
// 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.
Expand Down Expand Up @@ -217,7 +217,7 @@ class TestProcess {
///
/// 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;
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: Dart Team <misc@dartlang.org>
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"
Expand Down
4 changes: 2 additions & 2 deletions test/test_process_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ void main() {

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");
Expand Down