diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-11 15:14:54 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-11 15:14:54 +0200 |
commit | c9805ee15d05d39367b384203b75ca7af0c98836 (patch) | |
tree | 8e1d89e3a8c2df4a814272adbd252c6e6820a69b /test | |
parent | cc520551096424429ed440b5e12fabd124f850c9 (diff) |
Added tests for binary crap in variable values
Diffstat (limited to 'test')
-rwxr-xr-x | test/main | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -109,12 +109,22 @@ if ((test_extended)) { export flurbl=$'yo my fresh\nhomies' $envstore save flurbl unset flurbl - # XXX eval does not like newlines. Not even in dash. + # eval does not like newlines. Not even in dash. source <($envstore eval) [[ $flurbl == $'yo my fresh\nhomies' ]] unset flurbl $envstore clear + echo "# $envstore save (binary values)" + export noise=$'\xa0\xa5\x25\x01\x02\x77\xff\xf0' + $envstore save noise + pre_noise=$noise + unset noise + eval $($envstore eval) + [[ $noise == $pre_noise ]] + unset noise pre_noise + $envstore clear + echo "# invalid invocations" ! $envstore save &> /dev/null unset nonexistent |