Skip to content

Commit 899a0b5

Browse files
committed
Add test for pkg delete -a erroring out when it tries to delete pkg itself
1 parent 062daaa commit 899a0b5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/frontend/delete.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,23 @@
33
. $(atf_get_srcdir)/test_environment.sh
44

55
tests_init \
6+
delete_all \
67
delete_with_directory_owned \
78
simple_delete \
89
simple_delete_prefix_ending_with_slash
910

11+
delete_all_body() {
12+
atf_check -s exit:0 ${RESOURCEDIR}/test_subr.sh new_pkg "foo" "foo" "1"
13+
atf_check -s exit:0 ${RESOURCEDIR}/test_subr.sh new_pkg "pkg" "pkg" "1"
14+
atf_check -s exit:0 ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
15+
16+
atf_check -o ignore pkg register -M foo.ucl
17+
atf_check -o ignore pkg register -M pkg.ucl
18+
atf_check -o ignore pkg register -M test.ucl
19+
20+
atf_check -o ignore pkg delete -ay
21+
}
22+
1023
simple_delete_body() {
1124
touch file1
1225
mkdir dir

0 commit comments

Comments
 (0)