2010-09-22 17:25:19 +02:00
|
|
|
#!/usr/bin/expect
|
|
|
|
|
|
|
|
set timeout 1
|
|
|
|
|
2010-09-28 17:39:28 +02:00
|
|
|
spawn pseudoterm $env(PORT)
|
2010-09-22 17:25:19 +02:00
|
|
|
|
|
|
|
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"
|