Do not export unset variables.
* gash/environment.scm (get-environ): Filter out unset variables. * tests/42-sh-export-new.sh: New file. * tests/42-sh-export-new.stdout: New file. * Makefile.am (FULL_TESTS): Add tests/42-sh-export-new.sh. (XFAIL_TESTS): Remove tests/42-export-new.sh and tests/42-sh-export.sh. Co-authored-by: Timothy Sample <samplet@ngyro.com>
This commit is contained in:
parent
25597a4bec
commit
13f43973f5
|
@ -204,6 +204,7 @@ FULL_TESTS = \
|
||||||
tests/42-sh.sh \
|
tests/42-sh.sh \
|
||||||
tests/42-sh-export.sh \
|
tests/42-sh-export.sh \
|
||||||
tests/42-export-new.sh \
|
tests/42-export-new.sh \
|
||||||
|
tests/42-sh-export-new.sh \
|
||||||
tests/50-iohere.sh \
|
tests/50-iohere.sh \
|
||||||
tests/50-iohere-builtin.sh \
|
tests/50-iohere-builtin.sh \
|
||||||
tests/50-redirect.sh \
|
tests/50-redirect.sh \
|
||||||
|
@ -234,8 +235,6 @@ TESTS = $(UNIT_TESTS) $(FULL_TESTS)
|
||||||
|
|
||||||
XFAIL_TESTS = \
|
XFAIL_TESTS = \
|
||||||
tests/20-pipe-sed.sh \
|
tests/20-pipe-sed.sh \
|
||||||
tests/42-export-new.sh \
|
|
||||||
tests/42-sh-export.sh \
|
|
||||||
tests/70-hash.sh \
|
tests/70-hash.sh \
|
||||||
tests/70-hash-hash.sh \
|
tests/70-hash-hash.sh \
|
||||||
tests/70-percent.sh \
|
tests/70-percent.sh \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; Gash -- Guile As SHell
|
;;; Gash -- Guile As SHell
|
||||||
;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
|
;;; Copyright © 2018, 2019 Timothy Sample <samplet@ngyro.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of Gash.
|
;;; 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."
|
consider them as part of the set of current variables."
|
||||||
(let ((exported (hash-fold (lambda (name v acc)
|
(let ((exported (hash-fold (lambda (name v acc)
|
||||||
(match v
|
(match v
|
||||||
(#(value #t _)
|
(#((? values value) #t _)
|
||||||
(cons `(,name . ,value) acc))
|
(cons `(,name . ,value) acc))
|
||||||
(_ acc)))
|
(_ acc)))
|
||||||
'()
|
'()
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export V
|
||||||
|
|
||||||
|
. tests/42-export-new.sh
|
|
@ -0,0 +1 @@
|
||||||
|
no VEE
|
Loading…
Reference in New Issue