tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.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 "pwck\r" |
| 11 | expect "invalid user ID '4294967295'" |
| 12 | expect "pwck: no changes" |
| 13 | expect "# " |
| 14 | send "echo \$?\r" |
| 15 | expect "2" |
| 16 | send "exit\r" |
| 17 | puts "OK\n" |
| 18 | exit 0 |