Newer
Older
ubixos / bin / sh / tests / expansion / export3.0
@Charlie Root Charlie Root on 16 Jan 2018 490 bytes BSD Shell
# $FreeBSD: releng/11.1/bin/sh/tests/expansion/export3.0 238468 2012-07-15 10:19:43Z jilles $

w='@ @'
check() {
	[ "$v" = "$w" ] || echo "Expected $w got $v"
}

command export v=$w
check
command command export v=$w
check

HOME=/known/value
check() {
	[ "$v" = ~ ] || echo "Expected $HOME got $v"
}

command export v=~
check
command command export v=~
check

check() {
	[ "$v" = "x:$HOME" ] || echo "Expected x:$HOME got $v"
}

command export v=x:~
check
command command export v=x:~
check