Skip to content

Commit d669f81

Browse files
Update test with new expected behavior
Signed-off-by: Marek Kubica <[email protected]>
1 parent 468c937 commit d669f81

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

test/blackbox-tests/test-cases/pkg/pin-depends.t

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ Git pinned source:
9090
> EOF
9191
$ git add -A
9292
$ git commit --quiet -m "Initial commit"
93+
$ expected_commit=$(git rev-parse HEAD)
9394
$ cd ..
94-
$ runtest "git+file://$PWD/$dir"
95+
$ runtest "git+file://$PWD/$dir" | dune_cmd subst $expected_commit '$EXPECTED_COMMIT'
9596
Solution for dune.lock:
9697
- bar.1.0.0
9798
(version 1.0.0)
9899
(dev)
99-
(source (fetch (url git+file://PWD/_bar_git)))
100+
(source (fetch (url git+file://PWD/_bar_git#$EXPECTED_COMMIT)))
100101

101102
Git pinned source with toplevel opam file:
102103

@@ -109,13 +110,14 @@ Git pinned source with toplevel opam file:
109110
> EOF
110111
$ git add -A
111112
$ git commit --quiet -m "Initial commit"
113+
$ expected_commit=$(git rev-parse HEAD)
112114
$ cd ..
113-
$ runtest "git+file://$PWD/$dir"
115+
$ runtest "git+file://$PWD/$dir" | dune_cmd subst $expected_commit '$EXPECTED_COMMIT'
114116
Solution for dune.lock:
115117
- bar.1.0.0
116118
(version 1.0.0)
117119
(dev)
118-
(source (fetch (url git+file://PWD/_bar_opam_git)))
120+
(source (fetch (url git+file://PWD/_bar_opam_git#$EXPECTED_COMMIT)))
119121

120122
Git pinned source with toplevel opam dir 1
121123

@@ -129,13 +131,14 @@ Git pinned source with toplevel opam dir 1
129131
> EOF
130132
$ git add -A
131133
$ git commit --quiet -m "Initial commit"
134+
$ expected_commit=$(git rev-parse HEAD)
132135
$ cd ..
133-
$ runtest "git+file://$PWD/$dir"
136+
$ runtest "git+file://$PWD/$dir" | dune_cmd subst $expected_commit '$EXPECTED_COMMIT'
134137
Solution for dune.lock:
135138
- bar.1.0.0
136139
(version 1.0.0)
137140
(dev)
138-
(source (fetch (url git+file://PWD/_bar_opam_dir_git1)))
141+
(source (fetch (url git+file://PWD/_bar_opam_dir_git1#$EXPECTED_COMMIT)))
139142

140143
Git pinned source with toplevel opam dir 2
141144

test/blackbox-tests/test-cases/pkg/pin-stanza/source-locking.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ We should still be getting the initial message since the lock dir has not been
125125
updated:
126126

127127
$ dune exec ./main.exe
128-
git+file:// updated
128+
initial
129129

130130
However at the moment immediately getting the HEAD revision of the git repo.
131131

0 commit comments

Comments
 (0)