utils: Add Mu::canonicalize_filename
We need it for unit-tests
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
#include <glib/gprintf.h>
|
||||
|
||||
#include "mu-utils.hh"
|
||||
|
||||
#include "mu-util.h"
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
@ -447,6 +447,21 @@ Mu::size_to_string (const std::string& val, bool is_first)
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
std::string
|
||||
Mu::canonicalize_filename(const std::string& path, const std::string& relative_to)
|
||||
{
|
||||
char *fname = mu_canonicalize_filename (
|
||||
path.c_str(),
|
||||
relative_to.empty() ? NULL : relative_to.c_str());
|
||||
|
||||
std::string rv{fname};
|
||||
g_free (fname);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Mu::assert_equal(const std::string& s1, const std::string& s2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user