#! /usr/bin/perl -Idebian/tests/lib

use diagnostics;
use strict;
use warnings;

use AdduserTestsCommon;
use Test::More;

# enable ecryptfs kernel module
system('/sbin/modprobe', 'ecryptfs');

my $test_user="foocrypt";

assert_user_does_not_exist($test_user);

assert_command_failure('/usr/sbin/adduser', '--encrypt-home', $test_user);

system("getent passwd $test_user");
system("ls -l /home /home/$test_user");

assert_user_does_not_exist($test_user);

assert_path_does_not_exist("/home/$test_user");

done_testing();

