#!/usr/bin/expect set timeout 1 spawn pseudoterm $env(PORT) sleep 1 expect { ">$" {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "123456789012345678901234567890123456789012345678901234567890\n" expect { "shell: command not found." {} timeout { exit 1 } } send "start_test\n" expect { "\[TEST_START\]" {} timeout { exit 1 } } expect { ">$" {} timeout { exit 1 } } send "end_test\n" expect { "\[TEST_END\]" {} timeout { exit 1 } } puts "\nTest successful!\n"