#!/usr/bin/expect set timeout 5 spawn pseudoterm $env(PORT) expect { "Hello World!" {} timeout { exit 1 } } puts "\nTest successful!\n"