summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--tests/glibmm_buildfilename/main.cc25
2 files changed, 26 insertions, 1 deletions
diff --git a/README b/README
index b6417674..51f662ee 100644
--- a/README
+++ b/README
@@ -33,7 +33,7 @@ files used by Autotools.
$ cd your_builddir
If the tarball was made with Autotools, you must enable maintainer-mode:
- $ meson configure -Dmaintainer-mode=yes
+ $ meson configure -Dmaintainer-mode=true
Then, regardless of how the tarball was made:
$ ninja
diff --git a/tests/glibmm_buildfilename/main.cc b/tests/glibmm_buildfilename/main.cc
index 2460622b..09a5929f 100644
--- a/tests/glibmm_buildfilename/main.cc
+++ b/tests/glibmm_buildfilename/main.cc
@@ -1,6 +1,7 @@
#include <glibmm.h>
#include <iostream>
#include <string.h>
+#include <vector>
// Use this line if you want debug output:
// std::ostream& ostr = std::cout;
@@ -39,5 +40,29 @@ main(int, char**)
path = Glib::build_filename(dir_1, dir_2, dir_1, dir_3, dir_2, dir_3, dir_1, dir_2, file_2);
ostr << "Path 5: " << path << std::endl;
+ path = Glib::build_filename(dir_2, file_2);
+ ostr << "Path 6: " << path << std::endl;
+
+ path = Glib::build_filename(dir_2, file_3);
+ ostr << "Path 7: " << path << std::endl;
+
+ path = Glib::build_filename(dir_3, file_3);
+ ostr << "Path 8: " << path << std::endl;
+
+ path = Glib::build_filename(dir_1);
+ ostr << "Path 9: " << path << std::endl;
+
+ path = Glib::build_filename(nullptr);
+ ostr << "Path 10: " << path << std::endl;
+
+ std::vector<std::string> pathv;
+ pathv.push_back("vdir1");
+ path = Glib::build_filename(pathv);
+ ostr << "Path v1: " << path << std::endl;
+
+ pathv.push_back("vdir2");
+ path = Glib::build_filename(pathv);
+ ostr << "Path v2: " << path << std::endl;
+
return EXIT_SUCCESS;
}