t0001: add export unset works test
commit526005a4b6538a68daf6dc8d5f2ff22ce23716fc
authorKyle J. McKay <mackyle@gmail.com>
Wed, 14 Jun 2017 18:39:18 +0000 (14 11:39 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 14 Jun 2017 18:39:18 +0000 (14 11:39 -0700)
treeb8403d3ba4581bd30085a130d546cd62a873102e
parent16d611b93199fdf3d7559dad65dbe93e0cdd8ef5
t0001: add export unset works test

POSIX is very explicit about this.

The "export" command works on unset variables.  There's even a special
format for `export -p` output for unset variables.

It's very particular about specifying that marking variables for export
"shall cause them to be in the environment of subsequently executed commands."

Since the environment is just an array of "name=value" strings and the "="
does not appear to be optional, an unset but exported variable that appears
"in the environment of subsequently executed commands" will therefore be
indistinguishable from an exported variable of the same name set to the
empty string.

Nevertheless, POSIX hath spoken, make it so and add a test for this
unspeakable behavior.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/t0001-sanity.sh