Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
;;; Gash -- Guile As SHell
|
2019-02-15 15:10:35 +00:00
|
|
|
;;; Copyright © 2017 Timothy Sample <samplet@ngyro.com>
|
2017-12-09 17:01:40 +00:00
|
|
|
;;;
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
;;; This file is part of Gash.
|
2017-12-09 17:01:40 +00:00
|
|
|
;;;
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
;;; Gash is free software: you can redistribute it and/or modify
|
2017-12-09 17:01:40 +00:00
|
|
|
;;; 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.
|
|
|
|
;;;
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
;;; Gash is distributed in the hope that it will be useful,
|
2017-12-09 17:01:40 +00:00
|
|
|
;;; 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
|
Remove (almost) all references to Geesh.
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-02-15 00:55:07 +00:00
|
|
|
;;; along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
2017-12-09 17:01:40 +00:00
|
|
|
|
2018-12-12 19:23:09 +00:00
|
|
|
(define-module (tests unit automake)
|
Add support for Guile 2.0.9.
* gash/compat.scm: New file.
* gash/compat/hash-table.scm: New file.
* Makefile.am: Add them.
* .dir-locals.scm: Add indentation for 'if-guile-version-below'.
* guix.scm (guile-2.0.9): New variable.
* gash/built-ins/echo.scm (escape->control): Use '#\esc'.
* gash/environment.scm: Use '(gash compat hash-table)'.
* gash/built-ins/break.scm,
gash/built-ins/cd.scm,
gash/built-ins/command.scm,
gash/built-ins/continue.scm,
gash/built-ins/dot.scm,
gash/built-ins/exec.scm,
gash/built-ins/exit.scm,
gash/built-ins/pwd.scm,
gash/built-ins/return.scm,
gash/built-ins/set.scm,
gash/built-ins/shift.scm,
gash/built-ins/trap.scm,
gash/built-ins/type.scm,
gash/built-ins/umask.scm,
gash/eval.scm,
tests/unit/automake.scm: Use '(gash compat)'.
squash! Add support for Guile 2.0.9.
2019-05-20 00:33:05 +01:00
|
|
|
#:use-module (gash compat)
|
2017-12-09 17:01:40 +00:00
|
|
|
#:use-module (srfi srfi-64))
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
|
|
|
;;; This module sets up the SRFI 64 test system so that it plays well
|
|
|
|
;;; with automake's test system.
|
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(test-runner-factory
|
|
|
|
(lambda ()
|
|
|
|
(let ((runner (test-runner-simple)))
|
|
|
|
(test-runner-aux-value! runner (current-output-port))
|
|
|
|
(test-runner-on-group-begin! runner
|
|
|
|
(lambda (runner suite-name count)
|
|
|
|
(let ((log (test-runner-aux-value runner)))
|
|
|
|
(when (output-port? log)
|
|
|
|
(when (null? (test-runner-group-stack runner))
|
|
|
|
(display "%%%% Starting test " log)
|
|
|
|
(display suite-name log)
|
|
|
|
(newline log))
|
|
|
|
(display "Group begin: " log)
|
|
|
|
(display suite-name log)
|
|
|
|
(newline log)))))
|
|
|
|
(test-runner-on-final! runner
|
|
|
|
(lambda (runner)
|
|
|
|
(let ((log (test-runner-aux-value runner)))
|
|
|
|
(when (output-port? log)
|
|
|
|
(for-each (lambda (value-label-pair)
|
|
|
|
(when (> (car value-label-pair) 0)
|
|
|
|
(display (cdr value-label-pair) log)
|
|
|
|
(display (car value-label-pair) log)
|
|
|
|
(newline log)))
|
|
|
|
`((,(test-runner-pass-count runner)
|
|
|
|
. "# of expected passes ")
|
|
|
|
(,(test-runner-xfail-count runner)
|
|
|
|
. "# of expected failures ")
|
|
|
|
(,(test-runner-xpass-count runner)
|
|
|
|
. "# of unexpected successes ")
|
|
|
|
(,(test-runner-fail-count runner)
|
|
|
|
. "# of unexpected failures ")
|
|
|
|
(,(test-runner-skip-count runner)
|
|
|
|
. "# of skipped tests "))))
|
|
|
|
(when (or (> (test-runner-fail-count runner) 0)
|
|
|
|
(> (test-runner-xpass-count runner) 0))
|
|
|
|
(exit EXIT_FAILURE)))))
|
|
|
|
runner)))
|