/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Host/assets/Read-Host.Output.expect
21 строка
469 B
Steve Lee
Need explicit -command to execute command in Read-Host output test (#4103)
28 июн 2017, 20:13
28 июн 2017, 20:13
042a6f2
Код
Авторство
О чём код?
#!/usr/bin/expect -f exp_internal 1 # Expects path to PowerShell as first argument set powershell [lindex $argv 0] set timeout 60 spawn $powershell -nologo -noprofile -command Read-Host prompt expect { "prompt: $" { send "input\r" ; exp_continue } "input\r\ninput\r" { exit 2 } "input\r\n" { exit 0 } } # ExitCode: 2 -- this is the old, incorrect behavior # ExitCode: 0 -- this is the expected behavior # ExitCode: 1 -- anything else is wrong exit 1