aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.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-base64)
  #:use-module (guix base64)
  #:use-module (rnrs bytevectors)
  #:use-module (srfi srfi-64))

(define (string->base64 str)
  (base64-encode (string->utf8 str)))

;;; Test vectors from <https://tools.ietf.org/rfc/rfc4648.txt>.

(test-begin "base64")

(test-equal "empty string"
  (string->base64 "")
  "")

(test-equal "f"
  (string->base64 "f")
  "Zg==")

(test-equal "fo"
  (string->base64 "fo")
  "Zm8=")

(test-equal "foo"
  (string->base64 "foo")
  "Zm9v")

(test-equal "foob"
  (string->base64 "foob")
  "Zm9vYg==")

(test-equal "fooba"
  (string->base64 "fooba")
  "Zm9vYmE=")

(test-equal "foobar"
  (string->base64 "foobar")
  "Zm9vYmFy")

(test-end "base64")
span class='msg-tooltip'>* gnu/packages/cdrom.scm (cdrtools)[source]: Don't return #t from snippet. Tobias Geerinckx-Rice 2022-03-13gnu: cdrtools: Use G-expressions....* gnu/packages/cdrom.scm (cdrtools)[arguments]: Rewrite as G-expressions. Don't return #t from phases. Tobias Geerinckx-Rice 2022-03-13gnu: cdrtools: Link dynamically....* gnu/packages/cdrom.scm (cdrtools)[arguments]: Add "LINKMODE=dynamic" to the #:configure-flags. Tobias Geerinckx-Rice 2022-03-13gnu: cdrtools: Prepare for cross-compilation....* gnu/packages/cdrom.scm (cdrtools)[arguments]: Use CC-FOR-TARGET. Tobias Geerinckx-Rice 2021-12-20gnu: cdemu-daemon: Update to 3.2.6....* gnu/packages/cdrom.scm (cdemu-daemon): Update to 3.2.6. Tobias Geerinckx-Rice 2021-12-20gnu: libmirage: Update to 3.2.6....* gnu/packages/cdrom.scm (libmirage): Update to 3.2.6. Tobias Geerinckx-Rice 2021-12-13gnu: Remove superfluous "linux-libre-headers" inputs....This input is already propagated from glibc. * gnu/packages/chromium.scm (ungoogled-chromium)[inputs]: Remove LINUX-LIBRE-HEADERS-5.10. * gnu/packages/linux.scm (btrfs-progs)[native-inputs]: Likewise. * gnu/packages/accessibility.scm (brltty)[inputs]: Remove LINUX-LIBRE-HEADERS. * gnu/packages/graphics.scm (directfb)[inputs]: Likewise. * gnu/packages/gstreamer.scm (libdc1394)[inputs]: Likewise. * gnu/packages/linux.scm (python-evdev)[native-inputs]: Likewise. (bcc, bpftrace)[inputs]: Likewise. * gnu/packages/networking.scm (lksctp-tools)[inputs]: Likewise. * gnu/packages/video.scm (tslib)[inputs]: Likewise. * gnu/packages/web-browsers.scm (links)[native-inputs]: Likewise. * gnu/packages/cdrom.scm (cdrtools)[inputs]: Likewise. [arguments]: Adjust accordingly. * gnu/packages/lirc.scm (lirc)[inputs, arguments]: Likewise. * gnu/packages/vpn.scm (xl2tpd)[inputs, arguments]: Likewise. Marius Bakke 2021-12-13gnu: Simplify package inputs....This commit was obtained by running: ./pre-inst-env guix style without any additional argument. Ludovic Courtès 2021-12-10gnu: cdrkit-libre: Fix cross-compiling....* gnu/packages/cdrom.scm (cdrkit-libre)[source]: Add patch. * gnu/packages/patches/cdrkit-libre-cross-compile.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Efraim Flashner 2021-11-11gnu: cdparanoia: Disable parallel build....The build would sometimes fail with errors such as: make[1]: Entering directory '/tmp/guix-build-cdparanoia-10.2.drv-0/cdparanoia-III-10.2' gcc -O2 -fsigned-char -g -O2 -c main.c gcc -O2 -fsigned-char -g -O2 -c report.c gcc -O2 -fsigned-char -g -O2 -c header.c gcc -O2 -fsigned-char -g -O2 -c buffering_write.c gcc -O2 -fsigned-char -g -O2 -c cachetest.c gcc -O2 -fsigned-char -g -O2 -Wl,-rpath=/gnu/store/h0qhcyf0ci4kb70mmvxn8150rl6d3ykm-cdparanoia-10.2/lib -g -O2 main.o report.o header.o buffering_write.o cachetest.o \ -L/tmp/guix-build-cdparanoia-10.2.drv-0/cdparanoia-III-10.2/paranoia -L/tmp/guix-build-cdparanoia-10.2.drv-0/cdparanoia-III-10.2/interface \ -o cdparanoia -lcdda_interface -lcdda_paranoia -lm -lrt ld: main.o: in function `cleanup': /tmp/guix-build-cdparanoia-10.2.drv-0/cdparanoia-III-10.2/main.c:667: undefined reference to `paranoia_free' [...] collect2: error: ld returned 1 exit status * gnu/packages/cdrom.scm (cdparanoia)[parallel-build?]: Set to #f. Maxim Cournoyer 2021-11-08Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-11-07gnu: dvdisaster: Remove uninstallation script....* gnu/packages/cdrom.scm (dvdisaster)[arguments]: Add a new 'remove-uninstall-script phase. Tobias Geerinckx-Rice 2021-11-07gnu: dvdisaster: Update to 0.79.9....* gnu/packages/cdrom.scm (dvdisaster): Update to 0.79.9. [source, home-page]: Update home page. [arguments]: Don't explicitly return #t from phases. Tobias Geerinckx-Rice 2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-10-21gnu: cdparanoia: Don't build in parallel....* gnu/packages/cdrom.scm (cdparanoia)[arguments]: Disable #:parallel-build?. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com> Tobias Geerinckx-Rice