# https://www.embecosm.com/appnotes/ean8/ean8-howto-dejagnu-1.0.html spawn systemtest/mcc-execute.tests/test1 expect eof lassign [wait] pid spawnid os_error_flag value if {$os_error_flag == 0} { if {$value == 3} { pass "exit status: $value" } else { fail "exit status: $value" } } else { fail "errno: $value" }