freebsd-dev/usr.sbin/pw/tests/pw_config_test.sh
Enji Cooper 458cbf0ae6 Rename tests from <foo> to <foo>_test to match the FreeBSD test suite
naming scheme

usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test
to avoid collisions with the renamed FreeBSD test.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-23 03:28:24 +00:00

27 lines
649 B
Bash
Executable File

# $FreeBSD$
# Import helper functions
. $(atf_get_srcdir)/helper_functions.shin
atf_test_case generate_config
generate_config_body() {
atf_check -s exit:0 \
${PW} useradd -D -C ${HOME}/foo.conf
atf_check -o file:$(atf_get_srcdir)/pw.conf \
cat ${HOME}/foo.conf
}
atf_test_case modify_config_uid_gid_boundaries
modify_config_uid_gid_boundaries_body() {
atf_check -s exit:0 \
${PW} useradd -D -C ${HOME}/foo.conf \
-u 2000,5000 -i 2100,6000
atf_check -o file:$(atf_get_srcdir)/pw-modified.conf \
cat ${HOME}/foo.conf
}
atf_init_test_cases() {
atf_add_test_case generate_config
atf_add_test_case modify_config_uid_gid_boundaries
}