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)
nsion/commit/?h=koszko&id=90896bcfeb4e55c78d9a15700a6a4580f0df6365'>enable modularization of html filesWojtek Kosior 2021-08-04make settings_query.js use storage object passed as an argumentWojtek Kosior 2021-08-02[UNTESTED- will test] Add filtering for http-equiv CSP headersjahoti 2021-07-28Rationalize CSP violation report blocking....jahoti 2021-07-27validate settings on importWojtek Kosior 2021-07-26provide a facility to sanitize externally-obtained JSONWojtek Kosior 2021-07-26code maintenanceWojtek Kosior 2021-07-26Squash more CSP-filtering bugs...jahoti 2021-07-26Fix some bugs in the refined CSP handlingjahoti 2021-07-26[UNTESTED- will test] Use more nuanced CSP filtering...jahoti 2021-07-26Remove unnecessary imports of url_item and add a CSP header-parsing function...jahoti 2021-07-23extract observables implementation from storage.jsWojtek Kosior 2021-07-21add ability to query page content from repo and display it in the popupWojtek Kosior 2021-07-21store repository URLs in settingsWojtek Kosior 2021-07-21remove unused variablesWojtek Kosior 2021-07-20Merge rebranding to "Hachette"Wojtek Kosior 2021-07-20fix options_main.js bugsWojtek Kosior 2021-07-20fix page info server bugsWojtek Kosior 2021-07-20Merge commit 'ecb787046271de708b94da70240713e725299d86'Wojtek Kosior 2021-07-19Change the iconjahoti 2021-07-19Refer to the extension consistently as "Hachette" and remove TODOS.org...jahoti 2021-07-18Streamline and harden unique values/settings...jahoti 2021-07-17Revamp signatures and break header caching on FF...jahoti 2021-07-16Use URL-based policy smuggling...jahoti 2021-07-12merge jahoti into masterWojtek Kosior 2021-07-12Stop using the nonce consistently for a URL...jahoti 2021-07-11Remove redundant nonce-based filtering in the script suppressorjahoti 2021-07-11Integrate browser.js into exports_init.js, and streamline the resultjahoti 2021-07-06Merge popup displayWojtek Kosior 2021-07-06show some settings of the current page in the popupWojtek Kosior 2021-07-04Revamp default settings...jahoti 2021-07-02enable opening settings page with certain item immediately in edit modeWojtek Kosior 2021-07-02move parsing of url with targets to misc.jsWojtek Kosior 2021-07-02ignore some special files (emacs automatic backups) when buildingWojtek Kosior 2021-07-01Employ issue trackerWojtek Kosior 2021-06-30fix whitelisting under FirefoxWojtek Kosior 2021-06-30remove trailing whitespaceWojtek Kosior 2021-06-30refactor 3 miscellaneous fnctionalities to a their single own fileWojtek Kosior 2021-06-30emply an sh-based build system; make some changes to blockingWojtek Kosior 2021-06-28Index two new files intended for the previous commit.jahoti 2021-06-28License script-blocking techniques from NoScript in machine-readable format....jahoti 2021-06-26remove mnetion of LGPL from javascript exception to the GPLWojtek Kosior 2021-06-25make it clear "A" license contains text from BSD license with its own copyrightWojtek Kosior 2021-06-25gather all copyright info in 'copyright' fileWojtek Kosior 2021-06-23Fix storage initialization on Icecat 60...jahoti 2021-06-21change horizontal line style to light greenNicholas Johnson