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)
5d5449398d5babdf7fa1fe95af1c2'>doc: Move most 'HACKING' informations into the manual....Mathieu Lirzin 2015-06-10doc: Add 'help2man' to HACKING....Alex Kost 2015-05-23doc: Add "Running Guix Before It Is Installed"....Ludovic Courtès 2015-02-26doc: Remove reference to git submodules in HACKING....Mark H Weaver 2014-09-03doc: Mention 'guix lint' and '--list-dependent' in 'HACKING'....Ludovic Courtès 2014-05-11doc: Mention upgrades that trigger a lot of rebuilds....Ludovic Courtès 2014-03-10doc: Update packaging guidelines....Pierre-Antoine Rault 2013-12-07doc: Adjust "Building from Git" instructions....Ludovic Courtès 2013-09-07doc: Add "Data Types and Pattern Matching" to the Coding Style....Ludovic Courtès 2013-08-30doc: Add note about .dir-locals.el....Ludovic Courtès 2013-08-30doc: Add a "Coding Style" section in 'HACKING'....Ludovic Courtès 2013-08-30doc: Remove "Adding new packages" from `HACKING'....Ludovic Courtès 2013-08-26doc: Change `HACKING' to refer to guix-devel@gnu.org....Ludovic Courtès 2013-07-19doc: Improve build instructions in README and HACKING....Ludovic Courtès 2013-07-13doc: Add "Building from Git" to 'HACKING'.Nikita Karetnikov 2013-07-07doc: Move the packaging guidelines to the manual....Ludovic Courtès 2013-07-07doc: Add a "Porting" section....Ludovic Courtès 2013-06-10doc: Mention copyright/license auditing in `HACKING'.Ludovic Courtès 2013-06-09doc: Update bootstrap-related info in `HACKING'.Ludovic Courtès 2013-06-04doc: Write about patch submission and packaging guidelines....Ludovic Courtès 2013-02-12doc: Add the commit policy to HACKING....Ludovic Courtès 2013-01-22doc: Add "The Perfect Setup" in 'HACKING'....Ludovic Courtès 2013-01-21Update 'HACKING'....Nikita Karetnikov 2013-01-18Update `HACKING'....Ludovic Courtès 2013-01-08doc: Update porting instructions in `HACKING'....Ludovic Courtès 2012-11-21doc: Document basic package definitions....Ludovic Courtès 2012-11-18Turn Guix into "GNU Guix"....Ludovic Courtès 2012-11-04distro: Move bootstrap packages to (distro packages bootstrap)....Ludovic Courtès 2012-11-04doc: Add "Adding new packages" in `HACKING'....Ludovic Courtès 2012-10-25doc: Add `HACKING'....Ludovic Courtès