summaryrefslogtreecommitdiff
path: root/test/main
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-11 15:14:54 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-11 15:14:54 +0200
commitc9805ee15d05d39367b384203b75ca7af0c98836 (patch)
tree8e1d89e3a8c2df4a814272adbd252c6e6820a69b /test/main
parentcc520551096424429ed440b5e12fabd124f850c9 (diff)
Added tests for binary crap in variable values
Diffstat (limited to 'test/main')
-rwxr-xr-xtest/main12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/main b/test/main
index f3ec5a2..6d7cfeb 100755
--- a/test/main
+++ b/test/main
@@ -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