fix(ui): resolve M2 blocking bugs with full POSIX fork/exec PTY spawn and tmux environment isolation

This commit is contained in:
2026-07-16 22:56:19 +09:00
parent b7901bcce5
commit f52f6eb2af
8 changed files with 474 additions and 322 deletions
@@ -0,0 +1,27 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:mam_pty/mam_pty.dart';
import 'package:test/test.dart';
void main() {
test('PtySession runtime execution resolves process output', () async {
final pty = await PtySession.start('echo', ['hello-pty-ok']);
final completer = Completer<String>();
final buffer = StringBuffer();
final sub = pty.stdout.listen((data) {
buffer.write(utf8.decode(data));
}, onDone: () {
completer.complete(buffer.toString());
});
final result = await completer.future.timeout(const Duration(seconds: 3));
sub.cancel();
pty.close();
expect(result, contains('hello-pty-ok'));
print('PTY Runtime stdout verified: ' + result.trim());
});
}