;;; 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='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/log/?id=c1e7ae444a77aa5cc78a715f78843ccd178c9d6b'>root</a>/<a href='/guix/log/gnu?id=c1e7ae444a77aa5cc78a715f78843ccd178c9d6b'>gnu</a>/<a href='/guix/log/gnu/packages?id=c1e7ae444a77aa5cc78a715f78843ccd178c9d6b'>packages</a>/<a href='/guix/log/gnu/packages/ci.scm?id=c1e7ae444a77aa5cc78a715f78843ccd178c9d6b'>ci.scm</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/guix/log/gnu/packages/ci.scm?id=c1e7ae444a77aa5cc78a715f78843ccd178c9d6b&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th></tr>
<tr><td><span title='2021-02-02 14:15:50 +0100'>2021-02-02</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=3e82cd8bfc146d62cd1192a5d8903eb068aa6d0c'>gnu: cuirass: Update to 0.0.1-65.6bd940f.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-65.6bd940f.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-02-01 18:20:19 +0100'>2021-02-01</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=85843123dedc3060a128457f7814d7461cccb412'>gnu: cuirass: Update to 0.0.1-64.79b77b4.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-64.79b77b4.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-02-01 12:07:21 +0100'>2021-02-01</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=221fddd2e2495b1405daf1b34e9f52d6ad19cbbf'>gnu: cuirass: Update to 0.0.1-63.da93cb9.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-63.da93cb9.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-02-01 11:52:14 +0100'>2021-02-01</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=bd139ecda214878d0a11f5d6a47ca35e248b6f67'>gnu: cuirass: Update to 0.0.1-62.74c1a94.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-62.74c1a94.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-01-30 16:17:00 +0100'>2021-01-30</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=f4a32c5d6b9272f989d847a04d3f732d79a48f70'>gnu: cuirass: Update to 0.0.1-61.6838ec2.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-61.6838ec2.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-01-30 14:28:18 +0100'>2021-01-30</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=495bd7053c3ea88d7ba60c41891dd36607f6cc00'>gnu: cuirass: Update to 0.0.1-60.1e8d075.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-60.1e8d075.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-01-28 16:22:56 +0100'>2021-01-28</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=96c183bf65e149ecafa1ddf6c2bea4e4167bc6d5'>gnu: guile-sqlite3-dev: Remove it.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (guile-sqlite3-dev): Remove it.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-01-28 16:22:56 +0100'>2021-01-28</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=c13bd9bec84ce43c1e4aac415759537f16e822fa'>gnu: cuirass: Update to 0.0.1-59.68532ae.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-59.68532ae.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2021-01-28 12:57:27 +0100'>2021-01-28</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=0f01493dc893e43858953a37bc4859b323264524'>service: cuirass: Update it.</a></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2020-12-08 11:48:53 +0100'>2020-12-08</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=2dd4f389c7f436144941c9adfb0be7dddd22c73e'>gnu: cuirass: Update to 0.0.1-56.697fa14.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-56.697fa14.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2020-11-25 17:37:40 +0100'>2020-11-25</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=d5901789f4e517579efd8123f1c4c785440c6c06'>gnu: cuirass: Update to 0.0.1-55.fd432b8.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-55.fd432b8.
</span></span></td><td>Mathieu Othacehe</td></tr>
<tr><td><span title='2020-11-25 11:10:40 +0100'>2020-11-25</span></td><td><a href='/guix/commit/gnu/packages/ci.scm?id=3a089dd70eb66fbaf5e1703d87e93394fc73e0b5'>gnu: cuirass: Update to 0.0.1-54.e0f97e4.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/packages/ci.scm (cuirass): Update to 0.0.1-54.e0f97e4.
</span></span></td><td>Mathieu Othacehe</td></tr>