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)
a8c32eb926e465ba5b20a'>gnu: Add libwuya....Maxim Cournoyer 2020-10-06gnu: Fix up package copyright headers.Tobias Geerinckx-Rice 2020-07-12gnu: Remove ".git" from "https://github/…/….git"....Ludovic Courtès 2020-06-29gnu: sparse: Update to 0.6.2....Tobias Geerinckx-Rice 2020-06-25gnu: Add unifdef....Maxim Cournoyer 2020-06-12gnu: Add liblogging....Katherine Cox-Buday 2020-06-12gnu: Add libfastjson....Katherine Cox-Buday 2020-06-12gnu: Add libestr....Katherine Cox-Buday 2020-05-30gnu: libhx: Update to 3.25....Tobias Geerinckx-Rice 2020-05-27gnu: Add packcc....Marius Bakke 2020-05-14gnu: Add sparse....Jan (janneke) Nieuwenhuizen 2020-02-19gnu: libbytesize: Update to 2.2....Tobias Geerinckx-Rice 2019-12-03gnu: tcc: Add search paths and drop the wrapper....Andreas Enge 2019-11-26gnu: Add libhx....Guillaume Le Vaillant 2019-11-22gnu: libbytesize: Update to 2.1....Tobias Geerinckx-Rice 2019-05-21gnu: Add libfixposix....Pierre Neidhardt 2019-03-24gnu: Add udunits....Ricardo Wurmus 2019-01-31gnu: tcc: Fix building on armhf-linux....Efraim Flashner 2019-01-31gnu: tcc: Mark aarch64-linux as supported....Efraim Flashner 2018-11-21gnu: libbytesize: Make .mo file builds reproducible....Ludovic Courtès 2018-11-08gnu: pcc: Use INVOKE....Ricardo Wurmus 2018-10-24gnu: libbytesize: Update to 1.4....Tobias Geerinckx-Rice 2018-08-27Update email for Pierre Neidhardt....Pierre Neidhardt 2018-07-30gnu: Add libbytesize....Pierre Neidhardt 2018-04-30gnu: tcc-wrapper: Use Guile 2.2....Ludovic Courtès