On Tue, Dec 10, 2024 at 7:36 PM Jiang Xin <worldhello.net@xxxxxxxxx> wrote: > > From: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx> > > New dry-run test cases: > > - git push --porcelain --dry-run > - git push --porcelain --dry-run --force > - git push --porcelain --dry-run --atomic > - git push --porcelain --dry-run --atomic --force > > Signed-off-by: Jiang Xin <zhiyou.jx@xxxxxxxxxxxxxxx> > --- > t/t5548-push-porcelain.sh | 153 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 153 insertions(+) > > diff --git a/t/t5548-push-porcelain.sh b/t/t5548-push-porcelain.sh > index 799f6066a3..ba68808459 100755 > --- a/t/t5548-push-porcelain.sh > +++ b/t/t5548-push-porcelain.sh > @@ -310,10 +310,159 @@ run_git_push_porcelain_output_test() { > ' > } > > +run_git_push_dry_run_porcelain_output_test() { > + case $1 in > + http) > + PROTOCOL="HTTP protocol" > + URL_PREFIX="http://.*" > + ;; > + file) > + PROTOCOL="builtin protocol" > + URL_PREFIX="/.*" This line breaks CI on Windows, see: https://github.com/jiangxin/git/actions/runs/12255233680/job/34188220514 Should remove the leading "/". as follows: 1: 93123988ae ! 1: 9e764b6faf t5548: add porcelain push test cases for dry-run mode @@ t/t5548-push-porcelain.sh: run_git_push_porcelain_output_test() { + ;; + file) + PROTOCOL="builtin protocol" -+ URL_PREFIX="/.*" ++ URL_PREFIX=".*" + ;; + esac +