aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/moe.scm
diff options
context:
space:
mode:
authorJohn Soo <jsoo1@asu.edu>2020-03-28 10:30:48 -0700
committerMarius Bakke <mbakke@fastmail.com>2020-04-02 20:55:14 +0200
commitbe41d7d91df123a454e871190f1bb2711409bfa8 (patch)
tree869ef726c3274c41b319de3f6c3864d624ae4692 /gnu/packages/moe.scm
parenta8f1b52017820c87b9bb38abb42b48d8059688d3 (diff)
downloadguix-be41d7d91df123a454e871190f1bb2711409bfa8.tar.gz
guix-be41d7d91df123a454e871190f1bb2711409bfa8.zip
gnu: cedille: Install the info pages.
* gnu/packages/cedille.scm (cedille)[arguments]: Rename phase 'patch-cedille-path-el' to 'patch-cedille-paths' and add substitution for the info page location. In the 'copy-cedille-mode' phase, install the info page. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
Diffstat (limited to 'gnu/packages/moe.scm')
0 files changed, 0 insertions, 0 deletions
f='#n119'>119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-import-git)
  #:use-module (git)
  #:use-module (guix git)
  #:use-module (guix tests)
  #:use-module (guix packages)
  #:use-module (guix import git)
  #:use-module (guix git-download)
  #:use-module (guix tests git)
  #:use-module (guix build utils)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64))

;; Test the (guix import git) tools.

(test-begin "git")

(define* (make-package directory version #:optional (properties '()))
  (dummy-package "test-package"
    (version version)
    (properties properties)
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url (string-append "file://" directory))
             (commit version)))
       (sha256
        (base32
         "0000000000000000000000000000000000000000000000000000"))))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: no custom prefix, suffix, and delimiter"
  "1.0.1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "1.0.1" "Release 1.0.1"))
    (let ((package (make-package directory "1.0.0")))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: custom prefix, no suffix and delimiter"
  "1.0.1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "prefix-1.0.1" "Release 1.0.1"))
    (let ((package (make-package directory "1.0.0"
                                 '((release-tag-prefix . "prefix-")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: custom suffix, no prefix and delimiter"
  "1.0.1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "1.0.1-suffix-123" "Release 1.0.1"))
    (let ((package (make-package directory "1.0.0"
                                 '((release-tag-suffix . "-suffix-[0-9]*")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: custom delimiter, no prefix and suffix"
  "2021.09.07"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "2021-09-07" "Release 2021-09-07"))
    (let ((package (make-package directory "2021-09-06"
                                 '((release-tag-version-delimiter . "-")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: empty delimiter, no prefix and suffix"
  "20210907"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "20210907" "Release 20210907"))
    (let ((package (make-package directory "20210906"
                                 '((release-tag-version-delimiter . "")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: custom prefix and suffix, no delimiter"
  "2.0.0"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "Release-2.0.0suffix-1" "Release 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((release-tag-prefix . "Release-")
                                   (release-tag-suffix . "suffix-[0-9]")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: custom prefix, suffix, and delimiter"
  "2.0.0"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "Release-2_0_0suffix-1" "Release 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((release-tag-prefix . "Release-")
                                   (release-tag-suffix . "suffix-[0-9]")
                                   (release-tag-version-delimiter . "_")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: only pre-releases available"
  #f
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "2.0.0-rc1" "Release candidate for 2.0.0"))
    (let ((package (make-package directory "1.0.0")))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases"
  "2.0.0-rc1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "2.0.0-rc1" "Release candidate for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, and custom prefix"
  "2.0.0-rc1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "version-2.0.0-rc1" "Release candidate for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-prefix . "version-")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, and custom suffix"
  "2.0.0-rc1"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "2.0.0-rc1-suffix" "Release candidate for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-suffix . "-suffix")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, delimiter conflicts with pre-release part"
  "2.0.0_alpha"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "2_0_0_alpha" "Alpha release for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-version-delimiter . "_")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, and custom suffix and prefix"
  "2.0.0-alpha"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "prefix123-2.0.0-alpha-suffix" "Alpha release for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-prefix . "prefix[0-9]{3}-")
                                   (release-tag-suffix . "-suffix")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, and custom suffix, prefix, and delimiter"
  "2.0.0-alpha"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "prefix123-2-0-0-alpha-suffix" "Alpha release for 2.0.0"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-prefix . "prefix[0-9]{3}-")
                                   (release-tag-suffix . "-suffix")
                                   (release-tag-version-delimiter . "-")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: accept pre-releases, no delimiter, and custom suffix, prefix"
  "2alpha"
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "prefix123-2alpha-suffix" "Alpha release for version 2"))
    (let ((package (make-package directory "1.0.0"
                                 '((accept-pre-releases? . #t)
                                   (release-tag-prefix . "prefix[0-9]{3}-")
                                   (release-tag-suffix . "-suffix")
                                   (release-tag-version-delimiter . "")))))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: no tags found"
  #f
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit"))
    (let ((package (make-package directory "1.0.0")))
      (latest-git-tag-version package))))

(unless (which (git-command)) (test-skip 1))
(test-equal "latest-git-tag-version: no valid tags found"
  #f
  (with-temporary-git-repository directory
      '((add "a.txt" "A")
        (commit "First commit")
        (tag "Test" "Test tag"))
    (let ((package (make-package directory "1.0.0")))
      (latest-git-tag-version package))))

(test-end "git")