mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
150ffc7336
While the tests for sed itself are simple to begin with, some infrastructure was needed to make them simple. Firstly, there was no home for tests for the applications under Utilities, so I had to create a new subdirectory under Tests to host them. Secondly, and more importantly, there was previously no easy way to launch an executable and easily feed it with data for its stdin, then read its stdout/err and exit code. Looking around the repo I found that the JS tests do a very similar thing though, so I decided to adapt that solution for these tests, but with the higher purpose of someday moving this new Process class to LibCore/Process, where the existing spawn helpers are still very low level, and there is no representation of a Process object that one can easily interact with. Note that this Process implementation is very simple, offers limited functionality, and it doesn't use the EventLoop, so it can break on long inputs/outputs depending on the executable behavior. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
TestSed.cpp |