Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# $FreeBSD$

failures=''
ok=''

testcase() {
	code="$1"
	expected="$2"
	oIFS="$IFS"
	eval "$code"
	IFS='|'
	result="$#|$*"
	IFS="$oIFS"
	if [ "x$result" = "x$expected" ]; then
		ok=x$ok
	else
		failures=x$failures
		echo "For $code, expected $expected actual $result"
	fi
}

testcase 'shift $#; set -- ""$*'		'1|'
testcase 'shift $#; set -- $*""'		'1|'
testcase 'shift $#; set -- ""$@'		'1|'
testcase 'shift $#; set -- $@""'		'1|'
testcase 'shift $#; set -- """$*"'		'1|'
testcase 'shift $#; set -- "$*"""'		'1|'
testcase 'shift $#; set -- """$@"'		'1|'
testcase 'shift $#; set -- "$@"""'		'1|'

test "x$failures" = x