summaryrefslogtreecommitdiff
path: root/test/paths.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-10-31 16:02:19 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-10-31 16:02:19 +0100
commit463f0740e1731c15917ffdb3e2f4b3f4c83aa024 (patch)
treeec733f3744009834901d61b0fc52aafd354df5d7 /test/paths.h
parent406e1b1eeb2a760c0b89ff141a183c78d113a5e4 (diff)
Change to testdir before executing tests and add global paths variables for easier path testing inside the unit-tests.
Diffstat (limited to 'test/paths.h')
-rw-r--r--test/paths.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/paths.h b/test/paths.h
new file mode 100644
index 0000000..f149972
--- /dev/null
+++ b/test/paths.h
@@ -0,0 +1,15 @@
+// -*- c++ -*-
+// Distributed under the BSD 2-Clause License.
+// See accompanying file LICENSE for details.
+#pragma once
+
+#include <string>
+#include <filesystem>
+
+namespace paths
+{
+extern std::string argv_0;
+extern std::filesystem::path top_srcdir;
+extern std::filesystem::path top_builddir;
+extern std::filesystem::path testdir;
+}