diff --git a/Makefile.am b/Makefile.am index 7fa633a..d55facf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -204,6 +204,7 @@ FULL_TESTS = \ tests/42-sh.sh \ tests/42-sh-export.sh \ tests/42-export-new.sh \ + tests/42-sh-export-new.sh \ tests/50-iohere.sh \ tests/50-iohere-builtin.sh \ tests/50-redirect.sh \ @@ -234,8 +235,6 @@ TESTS = $(UNIT_TESTS) $(FULL_TESTS) XFAIL_TESTS = \ tests/20-pipe-sed.sh \ - tests/42-export-new.sh \ - tests/42-sh-export.sh \ tests/70-hash.sh \ tests/70-hash-hash.sh \ tests/70-percent.sh \ diff --git a/gash/environment.scm b/gash/environment.scm index 85d46f1..519ceaa 100644 --- a/gash/environment.scm +++ b/gash/environment.scm @@ -1,5 +1,5 @@ ;;; Gash -- Guile As SHell -;;; Copyright © 2018 Timothy Sample +;;; Copyright © 2018, 2019 Timothy Sample ;;; ;;; This file is part of Gash. ;;; @@ -202,7 +202,7 @@ suitable for passing to @code{environ}. If @var{bindings} is set, consider them as part of the set of current variables." (let ((exported (hash-fold (lambda (name v acc) (match v - (#(value #t _) + (#((? values value) #t _) (cons `(,name . ,value) acc)) (_ acc))) '() diff --git a/tests/42-sh-export-new.sh b/tests/42-sh-export-new.sh new file mode 100644 index 0000000..b91291e --- /dev/null +++ b/tests/42-sh-export-new.sh @@ -0,0 +1,3 @@ +export V + +. tests/42-export-new.sh diff --git a/tests/42-sh-export-new.stdout b/tests/42-sh-export-new.stdout new file mode 100644 index 0000000..b09af09 --- /dev/null +++ b/tests/42-sh-export-new.stdout @@ -0,0 +1 @@ +no VEE