Add tests for #238

Get IP and hostname from hosts file by alias.