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")
tès <ludo@gnu.org> gemmaro 2023-08-15gnu: highlight: Add "gui" output....* gnu/packages/pretty-print.scm (highlight): Add gui output. [source]: Add patch for GUI data directory. [outputs]: Add gui. [arguments]<phases>{fix-search-for-lua}: Fix Lua package name for GUI. {build-gui}: Add phase to build GUI. {install}: Set PREFIX variable. {install-gui}: Add phase to install GUI. [inputs]: Add qtbase-5. * gnu/packages/patches/highlight-gui-data-dir.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro 2023-08-15gnu: highlight: Use new package style....* gnu/packages/pretty-print.scm (highlight) Use new package style. [arguments]: Use G-expression. Drop trailing #t from phases. [source, inputs, native-inputs, description]: Reformat with guix style. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro 2023-08-15gnu: highlight: Update to 4.7....* gnu/packages/pretty-print.scm (highlight): Update to 4.7. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro 2023-06-26gnu: a2ps: Update to 4.15.5....* gnu/packages/pretty-print.scm (a2ps): Update to 4.15.5. Signed-off-by: Christopher Baines <mail@cbaines.net> Andy Tai 2023-06-25gnu: fmt: Update to 10.0.0....* gnu/packages/pretty-print.scm (fmt-10): New variable. (fmt-9): Inherit from fmt-10. (fmt-8): Inherit from fmt-9. (fmt-8.0, fmt-7): Inherit from fmt-8. (fmt-6): Inherit from fmt-7. (fmt): New variable. Liliana Marie Prikler 2023-04-22Merge remote-tracking branch 'origin/master' into core-updatesAndreas Enge 2023-04-21gnu: a2ps: Update to 4.15.4...* gnu/packages/pretty-print.scm (a2ps): Update to 4.15.4 Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Andy Tai 2023-04-14gnu: source-highlight: Inline skip-doc-directory phase....* gnu/packages/pretty-print.scm (source-highlight) [source]: Fix indentation. [arguments]: Inline skip-doc-directory phase. Maxim Cournoyer 2023-04-14Merge branch 'master' into core-updates....Conflicts: gnu/local.mk gnu/packages/build-tools.scm gnu/packages/certs.scm gnu/packages/check.scm gnu/packages/compression.scm gnu/packages/cups.scm gnu/packages/fontutils.scm gnu/packages/gnuzilla.scm gnu/packages/guile.scm gnu/packages/ibus.scm gnu/packages/image-processing.scm gnu/packages/linux.scm gnu/packages/music.scm gnu/packages/nss.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/qt.scm gnu/packages/ruby.scm gnu/packages/shells.scm gnu/packages/tex.scm gnu/packages/video.scm gnu/packages/vulkan.scm gnu/packages/web.scm gnu/packages/webkit.scm gnu/packages/wm.scm Maxim Cournoyer 2023-04-03gnu: a2ps: Improve package style....* gnu/packages/pretty-print.scm (a2ps)[origin]<snippet>: Use G-expressions. [arguments]<#:phases>: Use G-expression and SEARCH-INPUT-FILE. Nicolas Goaziou 2023-04-03gnu: a2ps: Update to 4.15.3....* gnu/packages/pretty-print.scm (a2ps): Update to 4.15.3. [inputs]: Add FILE, LIBGC, LIBPAPER. Re-order alphabetically. [native-inputs]: Add PKG-CONFIG. Re-order alphabetically. * gnu/packages/patches/a2ps-CVE-2001-1593.patch, gnu/packages/patches/a2ps-CVE-2014-0466.patch, gnu/packages/patches/a2ps-CVE-2015-8107.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove entries above. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Andy Tai