summaryrefslogtreecommitdiff
path: root/tests/git.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/git.scm')
-rw-r--r--tests/git.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/git.scm b/tests/git.scm
index aa4f03ca62c..d0646bbc85b 100644
--- a/tests/git.scm
+++ b/tests/git.scm
@@ -1,5 +1,6 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz
3;;; 4;;;
4;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
5;;; 6;;;
@@ -161,4 +162,31 @@
161 (commit-relation master1 merge) 162 (commit-relation master1 merge)
162 (commit-relation merge master1)))))) 163 (commit-relation merge master1))))))
163 164
165(unless (which (git-command)) (test-skip 1))
166(test-equal "remote-refs"
167 '("refs/heads/develop" "refs/heads/master"
168 "refs/tags/v1.0" "refs/tags/v1.1")
169 (with-temporary-git-repository directory
170 '((add "a.txt" "A")
171 (commit "First commit")
172 (tag "v1.0" "release-1.0")
173 (branch "develop")
174 (checkout "develop")
175 (add "b.txt" "B")
176 (commit "Second commit")
177 (tag "v1.1" "release-1.1"))
178 (remote-refs directory)))
179
180(unless (which (git-command)) (test-skip 1))
181(test-equal "remote-refs: only tags"
182 '("refs/tags/v1.0" "refs/tags/v1.1")
183 (with-temporary-git-repository directory
184 '((add "a.txt" "A")
185 (commit "First commit")
186 (tag "v1.0" "Release 1.0")
187 (add "b.txt" "B")
188 (commit "Second commit")
189 (tag "v1.1" "Release 1.1"))
190 (remote-refs directory #:tags? #t)))
191
164(test-end "git") 192(test-end "git")