summaryrefslogtreecommitdiff
path: root/tests/git.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-12-19 15:15:11 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-12-19 15:15:11 +0200
commit6ccf8ea81f95963c0b7f945648106576008ee105 (patch)
treef39f596e6c3e98ff1e9f1de0ad41c977e9dd37c1 /tests/git.scm
parentfcaed5b81e893f34d77527fbef389ca628ca882d (diff)
parent9f916d14765b00309c742fcbff0cfabdd10dcf05 (diff)
Merge branch 'master' into core-updates
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 aa4f03ca62..d0646bbc85 100644
--- a/tests/git.scm
+++ b/tests/git.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz
;;;
;;; This file is part of GNU Guix.
;;;
@@ -161,4 +162,31 @@
(commit-relation master1 merge)
(commit-relation merge master1))))))
+(unless (which (git-command)) (test-skip 1))
+(test-equal "remote-refs"
+ '("refs/heads/develop" "refs/heads/master"
+ "refs/tags/v1.0" "refs/tags/v1.1")
+ (with-temporary-git-repository directory
+ '((add "a.txt" "A")
+ (commit "First commit")
+ (tag "v1.0" "release-1.0")
+ (branch "develop")
+ (checkout "develop")
+ (add "b.txt" "B")
+ (commit "Second commit")
+ (tag "v1.1" "release-1.1"))
+ (remote-refs directory)))
+
+(unless (which (git-command)) (test-skip 1))
+(test-equal "remote-refs: only tags"
+ '("refs/tags/v1.0" "refs/tags/v1.1")
+ (with-temporary-git-repository directory
+ '((add "a.txt" "A")
+ (commit "First commit")
+ (tag "v1.0" "Release 1.0")
+ (add "b.txt" "B")
+ (commit "Second commit")
+ (tag "v1.1" "Release 1.1"))
+ (remote-refs directory #:tags? #t)))
+
(test-end "git")