1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# 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" }