2017-11-22 16:49:37 +11:00
|
|
|
#include "../tap.hpp"
|
2016-05-13 15:23:05 +10:00
|
|
|
|
2017-11-22 16:49:37 +11:00
|
|
|
#include "../exe.hpp"
|
2016-10-10 16:23:07 +11:00
|
|
|
|
2018-12-05 19:12:03 +11:00
|
|
|
#include <filesystem>
|
2018-08-13 16:12:11 +10:00
|
|
|
|
2016-10-10 16:23:07 +11:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2016-05-13 15:23:05 +10:00
|
|
|
int
|
2017-01-25 15:07:14 +11:00
|
|
|
main (int, char **argv)
|
2016-05-13 15:23:05 +10:00
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::TAP::logger tap;
|
2017-01-25 15:07:14 +11:00
|
|
|
|
2018-08-13 16:12:11 +10:00
|
|
|
// we'd like to compare based on the total path, but systems like msys2
|
|
|
|
// have varying styles of paths and it's difficult to harmonize the
|
|
|
|
// expected and queried values.
|
|
|
|
//
|
|
|
|
// so we compare the filename instead under the assumption that it should
|
|
|
|
// be stable across path styles.
|
|
|
|
auto const query = cruft::image_path ();
|
2018-12-05 19:12:03 +11:00
|
|
|
auto const truth = std::filesystem::path (argv[0]);
|
2018-08-13 16:12:11 +10:00
|
|
|
tap.expect_eq (
|
|
|
|
query.stem (),
|
|
|
|
truth.stem (),
|
|
|
|
"identify executable path # %!", query
|
|
|
|
);
|
|
|
|
|
2016-10-10 16:23:07 +11:00
|
|
|
return tap.status ();
|
2016-05-13 15:23:05 +10:00
|
|
|
}
|