Skip to content

Commit cdc82e9

Browse files
author
zopnote
committed
Just deleted ts, have already covered functionality by other tests
1 parent 5f25b76 commit cdc82e9

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

test/process_interface_test.dart

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ void main() {
4040
expect(exitCode, 0);
4141
});
4242

43-
test('onStdout callback receives data', () async {
44-
// Use echo command to test stdout callback
45-
final exe = Platform.isWindows ? 'C:\\Windows\\System32\\cmd.exe' : '/bin/sh';
46-
final args = Platform.isWindows
47-
? ['/c', 'echo', 'test']
48-
: ['-c', 'printf "test"']; // Use printf instead of echo for more reliable output
49-
50-
// Skip test if the file doesn't exist (edge case)
51-
if (!File(exe).existsSync()) {
52-
print('Skipping test: $exe not found');
53-
return;
54-
}
55-
56-
final List<int> output = [];
57-
final List<int> errorOutput = [];
58-
59-
final process = await ProcessInterface.fromFilepath(
60-
exe,
61-
args,
62-
onStdout: (data) => output.addAll(data),
63-
onStderr: (data) => errorOutput.addAll(data),
64-
);
65-
66-
await process.waitForExit();
67-
68-
// Check both stdout and stderr as some systems may output to stderr
69-
final allOutput = output + errorOutput;
70-
expect(allOutput, isNotEmpty, reason: 'Expected output on stdout or stderr');
71-
final outputStr = String.fromCharCodes(allOutput);
72-
expect(outputStr, contains('test'));
73-
});
7443

7544
test('ApplicationNotFoundException message is correct', () {
7645
final ex = ApplicationNotFoundException('my-app');

0 commit comments

Comments
 (0)