aboutsummaryrefslogtreecommitdiff
path: root/tests/repository-location/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-01 23:26:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-01 23:26:35 +0300
commit8546868b68642c2c9199825b5043c435b80dc90e (patch)
treecb6839c63caab69fedf91501eab55b7ada54a696 /tests/repository-location/driver.cxx
parent6b0eda1aa74cb306a477e25dfee3a2693151a396 (diff)
Do not strip absolute location canonical name prefix if the result is empty
Diffstat (limited to 'tests/repository-location/driver.cxx')
-rw-r--r--tests/repository-location/driver.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/repository-location/driver.cxx b/tests/repository-location/driver.cxx
index 48b32fd..2a2418c 100644
--- a/tests/repository-location/driver.cxx
+++ b/tests/repository-location/driver.cxx
@@ -237,6 +237,16 @@ main (int argc, char* argv[])
assert (l.canonical_name () == "aa/bb");
}
{
+ repository_location l ("/var/bpkg/1", repository_location ());
+ assert (l.string () == "/var/bpkg/1");
+ assert (l.canonical_name () == "/var/bpkg");
+ }
+ {
+ repository_location l ("/1", repository_location ());
+ assert (l.string () == "/1");
+ assert (l.canonical_name () == "/");
+ }
+ {
repository_location l ("/var/pkg/1/example.org/math/testing",
repository_location ());
assert (l.string () == "/var/pkg/1/example.org/math/testing");