aboutsummaryrefslogtreecommitdiff
path: root/tests/sets.scm
blob: cdb7efe1725d65501825ba23e2ec95e37dc8edb0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; 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)
2.48.0. [propagated-inputs]: New field with pcre. 宋文武 2016-04-16gnu: glib: Disable tests in build phases instead of patches....* gnu/packages/glib.scm (glib)[sources]: Remove glib-tests-desktop.patch, glib-tests-prlimit.patch and glib-tests-gapplicatiotn.patch. [arguments]: Add 'disable-falling-tests' phase. * gnu/packages/patches/glib-tests-timer.patch: Adjust accordingly. * gnu/packages/patches/glib-tests-desktop.patch, gnu/packages/patches/glib-tests-gapplication.patch, gnu/packages/patches/glib-tests-prlimit.patch: Remove files. * gnu-system.am (dist_patch_DATA): Remove them. 宋文武 2016-04-16gnu: glib: Drop glib-tests-homedir.patch....* gnu/packages/glib.scm (glib)[source]: Remove glib-tests-homedir.patch. [arguments]: Set HOME and disable '/gdbus/codegen-peer-to-peer' test. * gnu/packages/patches/glib-tests-homedir.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. 宋文武 2016-04-16gnu: glib: Use modify-phases syntax....* gnu/packages/glib.scm (glib)[arguments]: Use 'modify-phases'. 宋文武 2016-04-16gnu: dbus: Update to 1.10.8....* gnu/packages/glib.scm (dbus): Update to 1.10.8. 宋文武 2016-04-16gnu: gobject-introspection: Remove cairo from inputs....It's only for testing and tests are disabled. Remove it will allow building poppler with gobject-introspection. * gnu/packages/glib.scm (gobject-introspection)[inputs]: Remove cairo. 宋文武 2016-04-14gnu: packages: Use 'search-patches' everywhere....* gnu/packages/abiword.scm: Use 'search-patches' for 'patches' field. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/algebra.scm: Likewise. * gnu/packages/animation.scm: Likewise. * gnu/packages/apr.scm: Likewise. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/autotools.scm: Likewise. * gnu/packages/avahi.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bash.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/ci.scm: Likewise. * gnu/packages/cmake.scm: Likewise. * gnu/packages/cpio.scm: Likewise. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/dico.scm: Likewise. * gnu/packages/doxygen.scm: Likewise. * gnu/packages/ebook.scm: Likewise. * gnu/packages/elf.scm: Likewise. * gnu/packages/emacs.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/ftp.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gawk.scm: Likewise. * gnu/packages/gcc.scm: Likewise. * gnu/packages/gd.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/gnunet.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/gnuzilla.scm: Likewise. * gnu/packages/graphics.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/icu4c.scm: Likewise. * gnu/packages/idutils.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/imagemagick.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/ldc.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libevent.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libunwind.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/llvm.scm: Likewise. * gnu/packages/lsh.scm: Likewise. * gnu/packages/lua.scm: Likewise. * gnu/packages/lxqt.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/mit-krb5.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/multiprecision.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/ninja.scm: Likewise. * gnu/packages/nvi.scm: Likewise. * gnu/packages/ocaml.scm: Likewise. * gnu/packages/orpheus.scm: Likewise. * gnu/packages/ots.scm: Likewise. * gnu/packages/parallel.scm: Likewise. * gnu/packages/patchutils.scm: Likewise. * gnu/packages/pcre.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/plotutils.scm: Likewise. * gnu/packages/polkit.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/qemu.scm: Likewise. * gnu/packages/qt.scm: Likewise. * gnu/packages/ratpoison.scm: Likewise. * gnu/packages/rdf.scm: Likewise. * gnu/packages/readline.scm: Likewise. * gnu/packages/rush.scm: Likewise. * gnu/packages/scheme.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/sdl.scm: Likewise. * gnu/packages/slim.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/tcsh.scm: Likewise. * gnu/packages/texinfo.scm: Likewise. * gnu/packages/tls.scm: Likewise. * gnu/packages/tor.scm: Likewise. * gnu/packages/tv.scm: Likewise. * gnu/packages/valgrind.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/vtk.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xfce.scm: Likewise. * gnu/packages/xiph.scm: Likewise. * gnu/packages/xml.scm: Likewise. * gnu/packages/xorg.scm: Likewise. * gnu/packages/zip.scm: Likewise. Alex Kost 2016-03-09gnu: dbus: Incorporate "dbus-helper-search-path.patch"....* gnu/packages/glib.scm (dbus)[source]: Apply "dbus-helper-search-path.patch". (dbus/activation): Remove. * gnu/services/dbus.scm (<dbus-configuration>)[dbus]: Default to DBUS. (dbus-service): Likewise. Ludovic Courtès 2016-03-07gnu: python-pygobject: Propagate glib and libffi....* gnu/packages/glib.scm (python-pygobject): Move glib and libffi to propagated-inputs. (python2-pygobject)[inputs]: Remove glib and libffi. 宋文武 2016-03-07gnu: python-pygobject: Add search path for GI_TYPELIB_PATH....* gnu/packages/glib.scm (python-pygobject)[native-search-paths]: Use the same search paths as gobject-introspection. 宋文武 2016-02-21Update all sources from freedesktop.org to use https...* gnu/packages/xorg.scm: * gnu/packages/xdisorg.scm: * gnu/packages/video.scm: * gnu/packages/tls.scm: * gnu/packages/python.scm: * gnu/packages/pulseaudio.scm: * gnu/packages/polkit.scm: * gnu/packages/pdf.scm: * gnu/packages/libcanberra.scm: * gnu/packages/gtk.scm: * gnu/packages/gstreamer.scm: * gnu/packages/gnome.scm: * gnu/packages/glib.scm: * gnu/packages/ghostscript.scm: * gnu/packages/freedesktop.scm: * gnu/packages/fontutils.scm: Update all sources hosted on freedesktop to fetch tarballs via https. freedesktop.org appears to have updated recently to redirect all http to https. As an exception, we leave pkg-config like it is, because pkg-config is needed to build gnutls, and without gnutls we can't download https URLs. Andy Wingo 2016-02-08gnu: dbus: Use https source URL....* gnu/packages/glib.scm (dbus)[source]: Use https URL. Mark H Weaver 2016-02-07gnu: python-pygobject: Define 'python2-variant'....* gnu/packages/glib.scm (python-pygobject)[properties]: New field. (python2-pygobject): Use 'strip-python2-variant'. Ludovic Courtès 2016-02-05gnu: glibmm: Update to 2.46.3....* gnu/packages/glib.scm (glibmm): Update to 2.46.3. Efraim Flashner 2015-12-12Merge branch 'master' into core-updatesLudovic Courtès 2015-12-06gnu: Move pkg-config to native inputs....* gnu/packages/glib.scm (gobject-introspection)[native-inputs]: Move pkg-config from inputs. * gnu/packages/pulseaudio.scm (libsndfile, libsamplerate) (pulseaudio)[native-inputs]: Likewise. Mathieu Lirzin 2015-11-13gnu: Adjust formatting as recommended by 'guix lint'....* gnu/packages/aidc.scm (barcode, qrencode), gnu/packages/bash.scm (bash, bash-completion), gnu/packages/busybox.scm (busybox), gnu/packages/cdrom.scm (cdparanoia), gnu/packages/cmake.scm (cmake), gnu/packages/conkeror.scm (conkeror), gnu/packages/cook.scm (cook), gnu/packages/curl.scm (curl), gnu/packages/docbook.scm (docbook-xsl), gnu/packages/enlightenment.scm (enlightenment), gnu/packages/games.scm (abbaye), gnu/packages/geeqie.scm (exiv2), gnu/packages/gimp.scm (gegl), gnu/packages/gl.scm (glu, freeglut, ftgl), gnu/packages/glib.scm (glib), gnu/packages/gnome.scm (orbit2, gconf, geocode-glib), gnu/packages/gstreamer.scm (gstreamer, gst-plugins-base), gnu/packages/linux.scm (util-linux), gnu/packages/lisp.scm (gcl, ecl), gnu/packages/maths.scm (gnuplot, hdf5), gnu/packages/ssh.scm (dropbear), gnu/packages/web.scm (json-c): Remove tabulations and trailing white spaces or reformat to fit within 80 columns. * gnu/packages/audio.scm (aubio), gnu/packages/emacs.scm (emacs-s), gnu/packages/engineering.scm (geda-gaf), gnu/packages/games.scm (dosbox), gnu/packages/gnome.scm (gusb), gnu/packages/gtk.scm (gtk+), gnu/packages/guile.scm (guile-wisp), gnu/packages/hurd.scm (hurd-headers), gnu/packages/wm.scm (i3-wm): Adjust synopsis or description. 宋文武 2015-11-10gnu: telepathy-glib: Propagate inputs....* gnu/packages/glib.scm (telepathy-glib): Propagate inputs dbus, dbus-glib and glib. Move gobject-introspection and libxslt to 'native-inputs'. 宋文武 2015-10-30gnu: telepathy-glib: Fix tests....* gnu/packages/glib.scm (telepathy-glib)[source]: Add a patch to unique test names. 宋文武 2015-10-22gnu: dbus: Add variant with proper helper for service activation....* gnu/packages/patches/dbus-helper-search-path.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/glib.scm (dbus/activation): New variable. Ludovic Courtès 2015-10-15gnu: python-pygobject: Update to 3.18.0....* gnu/packages/glib.scm (python-pygobject): Update to 3.18.0. 宋文武 2015-10-15gnu: glibmm: Update to 2.46.1....* gnu/packages/glib.scm (glibmm): Update to 2.46.1. 宋文武 2015-10-15gnu: libsigc++: Update to 2.6.1....* gnu/packages/glib.scm (libsigc++): Update to 2.6.1. 宋文武 2015-10-15gnu: intltool: Update to 0.51.0....* gnu/packages/glib.scm (intltool): Update to 0.51.0. 宋文武 2015-10-15gnu: gobject-introspection: Update to 1.46.0....* gnu/packages/glib.scm (gobject-introspection): Update to 1.46.0. [source]: Add a snippet to correct python shebang. 宋文武 2015-10-15gnu: glib: Update to 2.46.1....* gnu/packages/glib.scm (glib): Update to 2.46.1. 宋文武 2015-10-14gnu: dbus: Drop patch....* gnu/packges/patches/dbus-localstatedir.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. * gnu/packages/glib.scm (dbus): Remove patch. [argumests]: Remove 'post-install' phase. Don't create localestatedir and sysconfdir in the 'install' phase. 宋文武 2015-10-14gnu: glib: Update to 2.46.0....* gnu/packages/glib.scm (glib): Update to 2.46.0. * gnu/packages/patches/glib-tests-desktop.patch: Add hunk to disable 'gdbus-unix-addresses' test. Ludovic Courtès 2015-10-14gnu: dbus: Update to 1.10.0....* gnu/packages/glib.scm (dbus)[source]: Update to 1.10.0. [arguments]: Add --sysconfdir=/etc. * gnu/packages/patches/dbus-localstatedir.patch: Update. Ludovic Courtès 2015-09-12gnu: glib: Update to 2.44.1....* gnu/packages/glib.scm (glib): Update to 2.44.1. 宋文武 2015-08-22gnu: itstool: Wrap with PYTHONPATH....* gnu/packages/glib.scm (itstool): Change 'propagated-inputs' to 'inputs'. [arguments]: New field. 宋文武 2015-08-18Revert "PRELIMINARY: Add dbus-fixed."...This reverts commit 86e3f95a09d903debba38cd1ff5dfd953f34a765. Mark H Weaver 2015-08-18PRELIMINARY: Add dbus-fixed.Mark H Weaver 2015-06-19gnu: itstool: Add python2-libxml2 to propagated-inputs....This is a followup to commit 7ce3224247d3acd559841f23d1b4b49d073b15f5. * gnu/packages/glib.scm (itstool)[propagated-inputs]: Add python2-libxml2. Mark H Weaver 2015-05-23gnu: dbus-glib: Propagate inputs dbus and glib....* gnu/packages/glib.scm (dbus-glib): Propagate inputs dbus and glib. * gnu/packages/audio.scm (patchage), gnu/packages/gnuzilla.scm (icecat), gnu/packages/python.scm (python-dbus): Drop inputs dbus and glib. * gnu/packages/gnome.scm (colord, gconf, gnome-vfs, upower), gnu/packages/mail.scm (claws-mail), gnu/packages/messaging.scm (hexchat), gnu/packages/wicd.scm (wicd): Drop input dbus. Andreas Enge