Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (20 sloc) 346 Bytes
#!/usr/bin/expect
set page [lindex $argv 0]
set port 4242
set file [open "select_tab.js"]
set content [split [read $file] "\n"]
close $file
spawn telnet localhost $port
foreach line $content {
send "$line\r"
}
send "selectTab(\"$page\");\r"
expect "repl> "
expect {
"true" {
exit 0
}
"false" {
exit 1
}
}