test: Add check-geesh.

This commit is contained in:
Jan Nieuwenhuizen 2018-10-31 20:43:15 +01:00
parent 6203f8cf07
commit ab4ce3b995
2 changed files with 6 additions and 2 deletions

View File

@ -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 @@
(('<sh-cmd-sub> cmd) `(substitution ,(transform cmd)))
(('<sh-cond> (expression then)) `(if-clause ,(transform expression) ,(transform then)))
(('<sh-with-redirects> (('<< 0 string)) pipeline)
(let ((pipeline (pke 'pipeline (transform pipeline))))
(let ((pipeline (transform pipeline)))
`(pipeline (display ,(transform string))
,@(match pipeline
(('command command ...) `(,pipeline))

View File

@ -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