Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Switch to new_pkg
Brad Davis committed 8 years ago
commit f452d8be706a5b9430f18a686bdb11a899889ec2
parent 0adc3fb
1 file changed +7 -56
modified tests/frontend/add.sh
@@ -15,19 +15,8 @@ tests_init \

initialize_pkg() {
	touch a
-
	cat << EOF > test.ucl
-
name: test
-
origin: test
-
version: 1
-
maintainer: test
-
categories: [test]
-
comment: a test
-
www: http://test
-
prefix: /
-
abi = "*";
-
desc: <<EOD
-
Yet another test
-
EOD
+
	atf_check -s exit:0 $(atf_get_srcdir)/test_subr.sh new_pkg test test 1
+
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a: ""
}
@@ -245,56 +234,18 @@ post-install
}

add_no_version_body() {
-
	cat << EOF > test.ucl
-
name: test
-
origin: test
-
version: 1
-
maintainer: test
-
categories: [test]
-
comment: a test
-
www: http://test
-
prefix: /
-
abi = "*";
-
desc: <<EOD
-
Yet another test
-
EOD
-
EOF

-
	cat << EOF > test-lib.ucl
-
name: test-lib
-
origin: test
-
version: 1
-
maintainer: test
-
categories: [test]
-
comment: a test
-
www: http://test
-
prefix: /
-
abi = "*";
-
desc: <<EOD
-
Yet another test
-
EOD
-
EOF
-

-
	cat << EOF > final.ucl
-
name: final
-
origin: test
-
version: 1
-
maintainer: test
-
categories: [test]
-
comment: a test
-
www: http://test
-
prefix: /
-
abi = "*";
-
desc: <<EOD
-
Yet another test
-
EOD
+
	for p in test test-lib final ; do
+
		atf_check -s exit:0 $(atf_get_srcdir)/test_subr.sh new_pkg ${p} ${p} 1
+
		if [ ${p} = "final" ]; then
+
			cat << EOF >> final.ucl
deps {
	test {
		origin = "test";
	}
}
EOF
-
	for p in test test-lib final ; do
+
		fi
		atf_check -o ignore -s exit:0 \
			pkg create -M ${p}.ucl
	done