summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2020-03-21 10:52:11 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-03-21 10:52:11 +0100
commit0acb40d8d575dd107ab5edd55d6d88d194d61a05 (patch)
treec014a30605989f9d3d59bcd0379a538ed5b1bdf4
parent77c13ecf4915a323eec69e40c192bf3df3461510 (diff)
downloadglibmm-2-62.tar.gz
tests/glibmm_buildfilename: Add some testsglibmm-2-62
See issue #71
-rw-r--r--README4
-rw-r--r--tests/glibmm_buildfilename/main.cc24
2 files changed, 26 insertions, 2 deletions
diff --git a/README b/README
index b6417674..f13cd66a 100644
--- a/README
+++ b/README
@@ -13,7 +13,7 @@ See README.win32
## Building from a release tarball
Extract the tarball and go to the extracted directory:
- $ tar xf glibmm-@GLIBMM_VERSION@.tar.gz
+ $ tar xf glibmm-@GLIBMM_VERSION@.tar.xz
$ cd glibmm-@GLIBMM_VERSION@
It's easiest to build with Meson, if the tarball was made with Meson,
@@ -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..71d2a9e4 100644
--- a/tests/glibmm_buildfilename/main.cc
+++ b/tests/glibmm_buildfilename/main.cc
@@ -39,5 +39,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;
}