Debian Codegraph @

tests/expiry/05_expiry_-c_no_shadow_file/expiry.exp

raw
1 #!/usr/bin/expect
2
3 set timeout 2
4 expect_after default {puts stderr "\nFAIL"; exit 1}
5
6 spawn /bin/sh
7 send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
8 expect "# "
9
10 send "expiry -c\r"
11 expect "# "
12 send "echo \$?\r"
13 expect "0"
14 expect "# "
15 send "exit\r"
16 puts "OK\n"
17 exit 0