aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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-bournish)
  #:use-module (guix build bournish)
  #:use-module (system base compile)
  #:use-module (system base language)
  #:use-module (srfi srfi-64))


(test-begin "bournish")

(test-equal "single statement"
  '(chdir "/foo")
  (read-and-compile (open-input-string "cd /foo")
                    #:from %bournish-language #:to 'scheme))

(test-equal "multiple statements"
  '(begin
     (chdir "/foo")
     (getcwd)
     ((@@ (guix build bournish) ls-command-implementation)))
  (read-and-compile (open-input-string "cd /foo\npwd\nls")
                    #:from %bournish-language #:to 'scheme))

(test-equal "rm"
  '(for-each delete-file (list "foo" "bar"))
  (read-and-compile (open-input-string "rm foo bar\n")
                    #:from %bournish-language #:to 'scheme))

(test-equal "rm -r"
  '(for-each (@ (guix build utils) delete-file-recursively)
             (list "/foo" "/bar"))
  (read-and-compile (open-input-string "rm -r /foo /bar\n")
                    #:from %bournish-language #:to 'scheme))

(test-end "bournish")

ss='msg-avail'>...Ricardo Wurmus 2020-03-10Merge branch 'master' into core-updatesMarius Bakke 2020-03-06gnu: sdl-pango: Rename patch to fix guix lint warning about patch filename size....Vagrant Cascadian 2020-02-10gnu: sdl2: Remove obsolete workaround....Marius Bakke 2020-02-03Merge branch 'staging' into core-updatesMarius Bakke 2020-02-02gnu: Add sdl-pango....Nicolas Goaziou 2020-01-22gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'....Marius Bakke 2020-01-09gnu: sdl2-image: Update to 2.0.5....Oleg Pykhalov 2020-01-07gnu: sdl-mixer: Fix fluidsynth in dependents....Danny Milosavljevic 2020-01-06gnu: sdl-mixer: Describe runtime configuration....Timotej Lazar 2020-01-05gnu: sdl2-mixer: Enable opus support....Timotej Lazar 2020-01-05gnu: sdl-mixer: Enable fluidsynth MIDI backend....Timotej Lazar 2020-01-05gnu: sdl2-mixer: Fix configure flags....Timotej Lazar 2020-01-05gnu: sdl-mixer: Remove unused configure flag....Timotej Lazar 2020-01-05gnu: sdl-mixer: Use correct inputs for MOD file support....Timotej Lazar 2020-01-03gnu: Add sdl2-cs....Pierre Neidhardt 2019-11-28Merge branch 'master' into stagingMarius Bakke 2019-11-24gnu: sdl2: Add libxcursor to inputs....Oleg Pykhalov 2019-10-15gnu: sdl2: Fix build on 32-bit architectures....Marius Bakke 2019-07-31Merge branch 'master' into core-updatesMarius Bakke 2019-07-26gnu: sdl2: Update to 2.0.10....Rutger Helling