@@ -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