aboutsummaryrefslogtreecommitdiff
path: root/tests/repository-location/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/repository-location/driver.cxx')
-rw-r--r--tests/repository-location/driver.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/repository-location/driver.cxx b/tests/repository-location/driver.cxx
index 89a32f8..014b810 100644
--- a/tests/repository-location/driver.cxx
+++ b/tests/repository-location/driver.cxx
@@ -201,6 +201,10 @@ namespace bpkg
assert (bad_loc ("file:/abc", repository_type::git));
#endif
+ // Can't be remote.
+ //
+ assert (bad_loc ("http://example.com/dir", repository_type::dir));
+
// Invalid web interface URL.
//
assert (bad_url (".a/..", loc ("http://stable.cppget.org/1/misc")));
@@ -321,6 +325,11 @@ namespace bpkg
assert (l.string () == "file:/#master");
assert (l.canonical_name () == "git:/#master");
}
+ {
+ repository_location l (loc ("/home/user/repo", repository_type::dir));
+ assert (l.string () == "/home/user/repo");
+ assert (l.canonical_name () == "dir:/home/user/repo");
+ }
#else
{
repository_location l (loc ("c:\\1\\aa\\bb", loc ()));
@@ -388,6 +397,11 @@ namespace bpkg
assert (l.string () == "file:/c:#master");
assert (l.canonical_name () == "git:c:#master");
}
+ {
+ repository_location l (loc ("c:\\user\\repo", repository_type::dir));
+ assert (l.string () == "c:\\user\\repo");
+ assert (l.canonical_name () == "dir:c:\\user\\repo");
+ }
#endif
{
repository_location l (loc ("../c/../c/./1/aa/../bb", loc ()));