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")

vail'>...Petter 2017-03-28gnu: Add keybinder....ng0 2017-03-21gnu: Adjust asciidoc-related build options....Kei Kebreau 2017-03-02gnu: Add perl-anyevent-i3....Marius Bakke 2017-02-12gnu: i3status: Update to 2.11....Marius Bakke 2017-01-23gnu: xmonad: Update to 0.12....Mekeor Melire 2017-01-18gnu: Add menumaker....ng0 2016-12-26gnu: awesome: Update to 4.0....ng0 2016-12-05gnu: i3-wm: Update to 4.13....Leo Famulari 2016-11-19gnu: Use 'mirror://' URLs in several places....Ludovic Courtès 2016-10-01gnu: Add quickswitch-i3....Ivan Vilata i Balaguer 2016-10-01gnu: Add python-i3-py....Ivan Vilata i Balaguer 2016-09-20gnu: awesome: Update to 3.5.9....doncatnip 2016-09-04gnu: awesome: Shorten the description....ng0 2016-07-21gnu: Update URLs for sourceforge.net....Leo Famulari 2016-07-12gnu: Remove unneeded 'imported-modules' fields for 'origin'....Ludovic Courtès 2016-06-16gnu: Add awesome....Carlo Zancanaro 2016-05-12gnu: Update module imports for asciidoc and doxygen....Mark H Weaver 2016-05-11gnu: libxkbcommon: Move to (gnu packages xdisorg)....Danny Milosavljevic 2016-05-06gnu: i3status: Update to 2.10....Al McElrath 2016-05-06gnu: i3status: Use https URLs....Leo Famulari 2016-05-06gnu: i3-wm: Use https URLs....Leo Famulari 2016-04-14gnu: packages: Use 'search-patches' everywhere....Alex Kost 2016-04-04gnu: i3-wm: Update to 4.12....Efraim Flashner 2016-03-11gnu: Add fluxbox....Danny Milosavljevic 2015-11-13gnu: Adjust formatting as recommended by 'guix lint'....宋文武 2015-10-23gnu: ghc-xmonad-contrib: Update to version 0.11.4....Paul van der Walt 2015-10-23gnu: xmonad: Patch for updated libraries....Paul van der Walt 2015-10-22gnu: evilwm: Add patch for lost-focus bug....Eric Bavier 2015-10-20gnu: Add evilwm....Eric Bavier 2015-10-16gnu: Add bspwm....xd1le 2015-09-11gnu: Add ghc-xmonad-contrib....Siniša Biđin 2015-09-11gnu: Add xmonad....Siniša Biđin 2015-08-23gnu: Add i3status....Eric Dvorsak 2015-08-23gnu: Add libconfuse....Eric Dvorsak 2015-08-23gnu: Add i3-wm....Eric Dvorsak