summaryrefslogtreecommitdiff
path: root/tests/expiry/02_expiry_-c_expired/expiry.exp
blob: a2dd1ba63b9cdfe23a4efc5c7997b3c978fb675d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/expect

set timeout 2
expect_after default {puts "\nFAIL"; exit 1}

spawn /bin/sh
send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
expect "# "

send "expiry -c\r"
expect "# "
send "echo \$?\r"
expect "1"
expect "# "
send "exit\r"
puts "OK\n"
exit 0