From ab4ce3b99562784ab46d84ff620a1c02e4a2e0a7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 31 Oct 2018 20:43:15 +0100 Subject: [PATCH] test: Add check-geesh. --- gash/geesh.scm | 5 +++-- makefile | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gash/geesh.scm b/gash/geesh.scm index c9f5fce..b5796b1 100644 --- a/gash/geesh.scm +++ b/gash/geesh.scm @@ -37,8 +37,9 @@ (format (current-error-port) "parse-tree:\n") (pretty-print parse-tree (current-error-port))) (let ((ast (parse-tree->script parse-tree))) + (when (> %debug-level 1) (format (current-error-port) "transformed:\n") - (pretty-print ast (current-error-port)) + (pretty-print ast (current-error-port))) (let* ((script (match ast (((or 'command 'pipeline) _ ...) `(script ,ast)) ((_ ...) `(script ,@ast)) @@ -86,7 +87,7 @@ ((' cmd) `(substitution ,(transform cmd))) ((' (expression then)) `(if-clause ,(transform expression) ,(transform then))) ((' (('<< 0 string)) pipeline) - (let ((pipeline (pke 'pipeline (transform pipeline)))) + (let ((pipeline (transform pipeline))) `(pipeline (display ,(transform string)) ,@(match pipeline (('command command ...) `(,pipeline)) diff --git a/makefile b/makefile index 2854861..2f1aaa6 100644 --- a/makefile +++ b/makefile @@ -35,6 +35,9 @@ endif check-gash: all SHELL=bin/gash ./check.sh +check-geesh: all + SHELL='bin/gash --geesh' ./check.sh + install: all mkdir -p $(DESTDIR)$(bindir) cp bin/gash $(DESTDIR)$(bindir)/gash