From 78229192fc54ec1822bb29146f08386e3c60f813 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 8 Mar 2018 18:14:44 +0300 Subject: Fix repository_name() to always recognize names for local repositories --- tests/rep-fetch.test | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test index f7be436..f0c0e2d 100644 --- a/tests/rep-fetch.test +++ b/tests/rep-fetch.test @@ -321,19 +321,21 @@ $* 2>>/EOE != 0 : dir-rep : +: For dir repository tests we will reuse local git repositories, that have the +: same repository structure. +: +if ($remote != true) { rep_add += --type dir + rep = $canonicalize([dir_path] $out_git/state0) + + +$clone_cfg && $rep_add $rep/libbar.git + : prerequisites : - if ($remote != true) { - # Let's reuse local git repositories that have the same repository - # structure as for dir type. - # - rep = $canonicalize([dir_path] $out_git/state0) - - $clone_root_cfg && $rep_add $rep/libbar.git; + $clone_cfg; $* 2>>"EOE"; fetching dir:($rep/libbar.git) @@ -346,6 +348,27 @@ $* 2>>/EOE != 0 prerequisite dir:($rep/style-basic.git) ($rep/style-basic.git) EOO } + + : by-name + : + : Here we, in particular, test that the local repository canonical name + : (dir:/...) is not confused with the repository URL. + : + { + $clone_cfg; + $* 2>!; + + $* "dir:($rep/libbar.git)" 2>>"EOE"; + fetching dir:($rep/libbar.git) + fetching dir:($rep/style-basic.git) \(prerequisite of dir:($rep/libbar.git)\) + 3 package\(s\) in 2 repository\(s\) + EOE + + $rep_list >>"EOO" + dir:($rep/libbar.git) ($rep/libbar.git) + prerequisite dir:($rep/style-basic.git) ($rep/style-basic.git) + EOO + } } : git-rep -- cgit v1.1