[lldb] [test] Use secondary pty end for testing Terminal
authorMichał Górny <mgorny@moritz.systems>
Fri, 8 Oct 2021 11:49:02 +0000 (13:49 +0200)
committerMichał Górny <mgorny@moritz.systems>
Fri, 8 Oct 2021 12:42:47 +0000 (14:42 +0200)
commit71fd5a735ec2f30105249dc367754a604ad00308
treee259d9438f419b1502306306e3a6a56227244ba1
parentd20840c93700e1051d7f9b24fa4bfefc5c5bba77
[lldb] [test] Use secondary pty end for testing Terminal

Open and use the secondary end of a pty for testing Terminal properties
in order to fix the tests on Darwin.  While at it, streamline getting
the fd and Terminal class.

Differential Revision: https://reviews.llvm.org/D111402
lldb/unittests/Host/posix/TerminalTest.cpp