if /dev/pts has wrong permissions, expect fails (as expected), but return code is zero:
$ expect -c "spawn -noecho true"
The system has no more ptys. Ask your system administrator to create more.
"spawn -noecho true"
$ echo $?
Seems like return code should be non-zero