aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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-upstream)
  #:use-module (gnu packages base)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix build-system gnu)
  #:use-module (guix import print)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix upstream)
  #:use-module (guix tests)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))


(test-begin "upstream")

(test-equal "coalesce-sources same version"
  '((source "foo" "1"
            ("ftp://example.org/foo-1.tar.xz"
             "ftp://example.org/foo-1.tar.gz")
            ("ftp://example.org/foo-1.tar.xz.sig"
             "ftp://example.org/foo-1.tar.gz.sig")))

  (map (lambda (source)
         `(source ,(upstream-source-package source)
                  ,(upstream-source-version source)
                  ,(upstream-source-urls source)
                  ,(upstream-source-signature-urls source)))
       (coalesce-sources (list (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.gz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.gz.sig")))
                               (upstream-source
                                (package "foo") (version "1")
                                (urls '("ftp://example.org/foo-1.tar.xz"))
                                (signature-urls
                                 '("ftp://example.org/foo-1.tar.xz.sig")))))))

(test-end)
rius Bakke 2019-07-09gnu: Remove indent@2.2.10....Marius Bakke 2019-05-14gnu: uncrustify: Update to 0.69.0....Pierre Neidhardt 2019-05-09gnu: cloc: Update to 1.82....Tobias Geerinckx-Rice 2019-03-06gnu: lcov: Update to 1.14....Tobias Geerinckx-Rice 2019-02-27gnu: cflow: Update to 1.6....Efraim Flashner 2019-01-24gnu: sloccount: Use INVOKE....Ricardo Wurmus 2019-01-16gnu: Move sqlite to separate module....Ricardo Wurmus 2019-01-06gnu: global: Update to 6.6.3....Efraim Flashner 2018-11-30gnu: uncrustify: Use git reference instead of GitHub archive....Pierre Neidhardt 2018-11-25gnu: uncrustify: Update to 0.68.1....Pierre Neidhardt 2018-10-30gnu: cloc: Update to 1.80....Tobias Geerinckx-Rice 2018-10-04gnu: rtags: Don't use unstable tarball....Tobias Geerinckx-Rice 2018-09-10gnu: cloc: Update source hash....Tobias Geerinckx-Rice 2018-09-09gnu: cloc: Update to 1.78....Tobias Geerinckx-Rice 2018-09-07gnu: indent: Add version 2.2.12....Ludovic Courtès 2018-08-27Update email for Pierre Neidhardt....Pierre Neidhardt 2018-08-14gnu: the-silver-searcher: Use HTTPS home page....Tobias Geerinckx-Rice 2018-08-14gnu: the-silver-searcher: Update to 2.2.0....Tobias Geerinckx-Rice 2018-06-27gnu: astyle: Update to 3.1....Ricardo Wurmus 2018-05-28Merge branch 'master' into core-updatesMark H Weaver 2018-05-28gnu: Add amalgamate....Fis Trivial 2018-05-24Merge branch 'master' into core-updatesMark H Weaver 2018-05-23gnu: Move 'indent' to code.scm....Ludovic Courtès 2018-05-23gnu: Move 'astyle' to code.scm....Ludovic Courtès 2018-05-23gnu: Add uncrustify....Pierre Neidhardt 2018-03-27gnu: Use invoke and return #t from all builders....Mark H Weaver 2018-03-20Merge branch 'master' into core-updatesMark H Weaver 2018-03-17gnu: Use the CMake build system's #:build-type key....Tobias Geerinckx-Rice 2018-03-16gnu: All snippets report errors using exceptions, else return #t....Mark H Weaver 2018-03-13gnu: Add makefile2graph....Christopher Baines 2018-03-08gnu: global: Replace GLOBAL with GNU GLOBAL in description....Clément Lassieur 2018-03-04gnu: cloc: Update phase style....Tobias Geerinckx-Rice 2018-03-04gnu: cloc: Update to 1.76....Tobias Geerinckx-Rice 2018-02-11gnu: global: Update to 6.6.2....Tobias Geerinckx-Rice 2018-02-09gnu: Add colormake....Oleg Pykhalov 2018-02-04gnu: rtags: Update to 2.18....Tobias Geerinckx-Rice 2018-01-31gnu: the-silver-searcher: Update to 2.1.0....Clément Lassieur 2018-01-23gnu: rtags: Fix the bundling issue....Fis Trivial 2018-01-13gnu: lcov: Update to 1.13....Tobias Geerinckx-Rice 2018-01-08gnu: Add rtags....Fis Trivial 2017-12-17gnu: global: Update to 6.6.1 [fixes CVE-2017-17531]....Efraim Flashner 2017-12-12gnu: global: Update to 6.6....Efraim Flashner