Skip to content

Commit

Permalink
Merge pull request #4093 from rgrinberg/revert-git
Browse files Browse the repository at this point in the history
Fix git tests for old git
  • Loading branch information
rgrinberg authored Jan 12, 2021
2 parents 31285ad + 622a26f commit 4d53aad
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion otherlibs/build-info/test/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Test embedding of build information
> (package (name $i))
> EOF
> (cd $i;
> git init --initial-branch master -q
> git init -q;
> git add .;
> git commit -q -m _;
> git tag -a 1.0+$i -m _)
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/dune-project-meta/main.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ generated META and opam files.
> EOF

$ (cd version
> git init --initial-branch master -q
> git init -q
> git add .
> git commit -qm _
> git tag -a 1.0 -m 1.0
Expand Down Expand Up @@ -217,7 +217,7 @@ generated META and opam files.
> EOF

$ (cd version
> git init --initial-branch master -q
> git init -q
> git add .
> git commit -qm _
> git tag -a 1.0 -m 1.0
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/meta-template-version-bug.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This test demonstrates a bug when there's a package with a meta template and a
custom version:

$ git init --initial-branch master -q
$ git init -q
$ git add .
$ git commit -qm _
$ git tag -a 1.0 -m 1.0
Expand Down
6 changes: 3 additions & 3 deletions test/blackbox-tests/test-cases/subst.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Project with opam files

$ echo 'authors: [ "John Doe <[email protected]>" ]' > foo.opam

$ git init --initial-branch master -q
$ git init --quiet
$ git add .
$ git commit -am _ --quiet
$ git tag -a 1.0 -m 1.0
Expand Down Expand Up @@ -51,7 +51,7 @@ And without an opam file preset.
> let version = "${X}VERSION${X}"
> EOF

$ git init --initial-branch master -q
$ git init --quiet
$ git add .
$ git commit -am _ --quiet
$ git tag -a 1.0 -m 1.0
Expand Down Expand Up @@ -88,7 +88,7 @@ Test subst and files with unicode (#3879)
> let version = "${X}VERSION${X}"
> EOF

$ git init --initial-branch master -q
$ git init --quiet
$ git add .
$ git commit -am _ --quiet
$ git tag -a 1.0 -m 1.0
Expand Down
9 changes: 3 additions & 6 deletions test/expect-tests/vcs_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ type action =

let run_action (vcs : Vcs.t) action =
match action with
| Init -> (
match vcs.kind with
| Hg -> run vcs [ "init" ]
| Git -> run vcs [ "init"; "--initial-branch"; "master" ] )
| Init -> run vcs [ "init"; "-q" ]
| Add fn -> run vcs [ "add"; fn ]
| Commit -> (
match vcs.kind with
Expand Down Expand Up @@ -150,7 +147,7 @@ let%expect_test _ =
run Git script;
[%expect
{|
$ git init --initial-branch master
$ git init -q
$ echo "-" > a
$ git add a
$ git commit -m 'commit message'
Expand Down Expand Up @@ -193,7 +190,7 @@ let%expect_test _ =
run Hg script;
[%expect
{|
$ hg init
$ hg init -q
$ echo "-" > a
$ hg add a
$ hg commit -m 'commit message' -u toto
Expand Down

0 comments on commit 4d53aad

Please sign in to comment.