utils: add some more helpers for test code

Creating and removing (temp) dirs, running mu commands.
This commit is contained in:
Dirk-Jan C. Binnema
2023-07-09 12:44:47 +03:00
parent 904f64aa03
commit cc65b8b401
4 changed files with 87 additions and 11 deletions

View File

@ -22,6 +22,7 @@
#include <string>
#include <utils/mu-utils.hh>
#include <utils/mu-result.hh>
namespace Mu {
@ -97,6 +98,18 @@ bool set_en_us_utf8_locale();
void allow_warnings();
/**
* Execute the in-tree mu executable with the arguments
* Asserts if fails.
*
* @param args arguments;;
*
* @return either the exit code or an error.
*/
Result<int> run_mu_command(const std::string& args);
/**
* For unit-tests, a RAII tempdir.
*