aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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-sets)
  #:use-module (guix sets)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-64))


(test-begin "sets")

(test-assert "set-contains?"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (and (every (cut set-contains? set <>)
                lst)
         (not (set-contains? set -1)))))

(test-assert "set->list"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (lset= = lst (set->list set))))

(test-assert "set-union"
  (let* ((a  (list 'a))
         (b  (list 'b))
         (s1 (setq a))
         (s2 (setq b))
         (s3 (set-union s1 s2)))
    (and (set-contains? s3 a)
         (set-contains? s3 b))))

(test-end)
tution for safepath. Brice Waegeneire 2021-06-19Merge branch 'master' into core-updates...Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm Marius Bakke 2021-06-19gnu: isc-dhcp: Adjust for GCC 10....* gnu/packages/patches/isc-dhcp-gcc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/admin.scm (isc-dhcp)[source](patches): New field. Marius Bakke 2021-06-14gnu: Rename qtbase to qtbase-5....This change was automated via the following command: $ git ls-files | xargs sed -i 's/,qtbase)/,qtbase-5)/g' $ git ls-files | xargs sed -i 's/inherit qtbase)/inherit qtbase-5)/g' $ git ls-files | xargs sed -i 's/package-version qtbase)/package-version qtbase-5)/g' $ git checkout etc # to clear some spurious changes This is done so the qtbase package can be upgraded to version 6 in the following commit. Maxim Cournoyer 2021-06-13gnu: bpytop: Update to 1.0.67....* gnu/packages/admin.scm (bpytop): Update to 1.0.67. [arguments]: Adjust custom 'install-themes phase. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Michael Rohleder 2021-06-12gnu: sudo: Update to 1.9.7p1....* gnu/packages/admin.scm (sudo): Update to 1.9.7p1. Tobias Geerinckx-Rice 2021-06-11gnu: thermald: Update to 2.4.6....* gnu/packages/admin.scm (thermald): Update to 2.4.6. Tobias Geerinckx-Rice 2021-06-06Merge branch 'master' into core-updates... Conflicts: gnu/local.mk gnu/packages/algebra.scm gnu/packages/bioinformatics.scm gnu/packages/curl.scm gnu/packages/docbook.scm gnu/packages/emacs-xyz.scm gnu/packages/maths.scm gnu/packages/plotutils.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/radio.scm gnu/packages/readline.scm gnu/packages/tls.scm gnu/packages/xml.scm gnu/packages/xorg.scm Marius Bakke 2021-06-05gnu: nnn: Remove marketing hyperbole....* gnu/packages/admin.scm (nnn)[description]: Gush less. Tobias Geerinckx-Rice 2021-06-05gnu: nnn: Use #:make-flags over Makefile patching....* gnu/packages/admin.scm (nnn)[arguments]: Remove 'patch-pkg-config phase. Set PKG_CONFIG in #:make-flags instead. Tobias Geerinckx-Rice 2021-06-05gnu: nnn: Update to 4.1.1....* gnu/packages/admin.scm (nnn): Update to 4.1.1. Tobias Geerinckx-Rice 2021-06-05gnu: thermald: Compile with -Werror again....* gnu/packages/admin.scm (thermald)[arguments]: Remove substitution, and a #t whilst we're here. Tobias Geerinckx-Rice 2021-06-05gnu: thermald: Update to 2.4.5....* gnu/packages/admin.scm (thermald): Update to 2.4.5. Tobias Geerinckx-Rice 2021-05-29gnu: isc-dhcp: Update home page....* gnu/packages/admin.scm (isc-dhcp)[home-page]: Update. Tobias Geerinckx-Rice 2021-05-29gnu: isc-dhcp: Update to 4.4.2-P1 [fixes CVE-2021-25217]....* gnu/packages/admin.scm (isc-dhcp): Update to 4.4.2-P1. Tobias Geerinckx-Rice 2021-05-22Merge branch 'master' into core-updatesMarius Bakke 2021-05-20gnu: detox: Update to 1.4.2....* gnu/packages/admin.scm (detox): Update to 1.4.2 [arguments]: Remove '#:tests?', provide customer 'check' phase. Eric Bavier 2021-05-20gnu: isc-dhcp: Update bundled BIND to 9.11.32....* gnu/packages/admin.scm (isc-dhcp)[inputs]: Update bundled BIND to 9.11.32. Tobias Geerinckx-Rice 2021-05-15Merge branch 'master' into core-updatesLudovic Courtès 2021-05-13gnu: shepherd: Decrease optimization level....* gnu/packages/admin.scm (shepherd)[source](modules, snippet): New fields. Marius Bakke 2021-05-13gnu: lynis: Update to 3.0.4....* gnu/packages/admin.scm (lynis): Update to 3.0.4. Tobias Geerinckx-Rice 2021-05-12gnu: sudo: Update to 1.9.7....* gnu/packages/admin.scm (sudo): Update to 1.9.7. Tobias Geerinckx-Rice 2021-05-09Merge branch 'master' into core-updates... Conflicts: gnu/local.mk gnu/packages/bioinformatics.scm gnu/packages/django.scm gnu/packages/gtk.scm gnu/packages/llvm.scm gnu/packages/python-web.scm gnu/packages/python.scm gnu/packages/tex.scm guix/build-system/asdf.scm guix/build/emacs-build-system.scm guix/profiles.scm Marius Bakke 2021-05-02gnu: bpytop: Update to 1.0.65....* gnu/packages/admin.scm (bpytop): Update to 1.0.65. Tobias Geerinckx-Rice 2021-05-02gnu: Replace hard-coded "CC=gcc" with CC-FOR-TARGET calls....* gnu/packages/admin.scm (cbatticon)[arguments]<#:make-flags>: Use CC-FOR-TARGET. * gnu/packages/assembly.scm (dev86)[arguments]<#:make-flags>: Likewise. * gnu/packages/cdrom.scm (cd-discid)[arguments]<#:make-flags>: Likewise. * gnu/packages/crypto.scm (signify, keyutils, ssss, libscrypt, enchive) [arguments]<#:make-flags>: Likewise. * gnu/packages/emacs-xyz.scm (emacs-emacsql, emacs-telega)[arguments] <#:phases>: Likewise. * gnu/packages/gnupg.scm (pgpdump)[arguments]<#:make-flags>: Likewise. * gnu/packages/image-viewers.scm (feh, imv)[arguments]<#:make-flags>: Likewise. * gnu/packages/image.scm (libjxr, giflib, freeimage)[arguments] <#:make-flags>: Likewise. * gnu/packages/irc.scm (ii, sic)[arguments]<#:make-flags>: Likewise. * gnu/packages/lua.scm (make-lua-expat, make-lua-ossl, make-lua-sec) (make-lua-cqueues, make-lua-lgi, lua-resty-signal)[arguments] <#:make-flags>: Likewise. * gnu/packages/networking.scm (httping, pixiewps, sslh, nethogs, spiped) (can-utils, hcxtools, batctl)[arguments]<#:make-flags>: Likewise. * gnu/packages/pdf.scm (fbida)[arguments]<#:make-flags>: Likewise. * gnu/packages/ssh.scm (endlessh)[arguments]<#:make-flags>: Likewise. * gnu/packages/toys.scm (nyancat)[arguments]<#:make-flags>: Likewise. * gnu/packages/upnp.scm (miniupnpc)[arguments]<#:make-flags>: Likewise. * gnu/packages/xdisorg.scm (bemenu, xbanish, sxhkd, xcape, xssproxy) (xrandr-invert-colors, hsetroot, xsettingsd)[arguments]<#:make-flags>: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Maxime Devos 2021-04-28gnu: isc-dhcp: Update bundled BIND to 9.11.31 [security fixes]....Fixes CVE-2021-{25214,25215,25216]. * gnu/packages/admin.scm (isc-dhcp)[inputs]: Update bundled BIND to 9.11.31. Leo Famulari 2021-04-27gnu: bpytop: Update to 1.0.64....* gnu/packages/admin.scm (bpytop): Update to 1.0.64. [description]: Follow upstream changes. Tobias Geerinckx-Rice 2021-04-27gnu: solaar: Update to 1.0.6....* gnu/packages/admin.scm (solaar): Update to 1.0.6. Tobias Geerinckx-Rice 2021-04-23gnu: nnn: Use PKG-CONFIG-FOR-TARGET....* gnu/packages/admin.scm (nnn)[arguments]: Substitute PKG-CONFIG-FOR-TARGET for the equivalent STRING-APPEND. Tobias Geerinckx-Rice 2021-04-23gnu: nnn: Update to 4.0....* gnu/packages/admin.scm (nnn): Update to 4.0. Tobias Geerinckx-Rice 2021-04-23gnu: thermald: Update to 2.4.4....* gnu/packages/admin.scm (thermald): Update to 2.4.4. Tobias Geerinckx-Rice 2021-04-22gnu: Add daemonize....* gnu/packages/admin.scm (daemonize): New variable. Signed-off-by: Ricardo Wurmus <rekado@elephly.net> WinterHound 2021-04-19gnu: inxi-minimal: Update to 3.3.04-1....* gnu/packages/admin.scm (inxi-minimal): Update to 3.3.04-1. Tobias Geerinckx-Rice 2021-04-16Merge remote-tracking branch 'origin/master' into core-updates... Conflicts: gnu/local.mk gnu/packages/boost.scm gnu/packages/chez.scm gnu/packages/compression.scm gnu/packages/crates-io.scm gnu/packages/docbook.scm gnu/packages/engineering.scm gnu/packages/gcc.scm gnu/packages/gl.scm gnu/packages/gtk.scm gnu/packages/nettle.scm gnu/packages/python-check.scm gnu/packages/python-xyz.scm gnu/packages/radio.scm gnu/packages/rust.scm gnu/packages/sqlite.scm guix/build-system/node.scm Efraim Flashner 2021-04-12gnu: Add prips....gnu/packages/admin.scm (prips): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> methuselah-0 2021-04-11gnu: acpica: Update to 20210331....* gnu/packages/admin.scm (acpica): Update to 20210331. Tobias Geerinckx-Rice