Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add more annotation tests
Brad Davis committed 11 years ago
commit 8b109ae3f8d9cef5f82172b908647cb08ebac0b9
parent 6eb7736
1 file changed +26 -6
modified tests/frontend/annotate.shin
@@ -34,6 +34,12 @@ annotate_body() {
	    -s exit:0 \
	    pkg info -A png

+
	atf_check \
+
	    -o match:"^png-1.5.18: Tag: TEST1 Value: test1$" \
+
	    -e empty \
+
	    -s exit:0 \
+
	    pkg annotate -S png TEST1
+

	echo test2 > $HOME/annotate-TEST2.txt

	atf_check \
@@ -63,6 +69,12 @@ annotate_body() {
	    pkg info -A png

	atf_check \
+
	    -o match:"^png-1.5.18: Tag: TEST1 Value: test1-modified$" \
+
	    -e empty \
+
	    -s exit:0 \
+
	    pkg annotate --show png TEST1
+

+
	atf_check \
	    -o match:"Deleted annotation tagged: TEST1" \
	    -e empty \
	    -s exit:0 \
@@ -90,20 +102,28 @@ annotate_body() {

	# Check multiple annotations
	atf_check \
-
	    -o match:"added annotation tagged: TEST1" \
+
	    -o match:"^png-1.5.18: added annotation tagged: TEST1$" \
+
	    -o match:"^sqlite3-3.8.6: added annotation tagged: TEST1$" \
	    -e empty \
	    -s exit:0 \
-
	    pkg annotate -Ay png TEST1 test1
+
	    pkg annotate -aAy TEST1 test1

	atf_check \
-
	    -o match:"added annotation tagged: TEST1" \
+
	    -o match:"^png-1.5.18: Tag: TEST1 Value: test1$" \
+
	    -o match:"^sqlite3-3.8.6: Tag: TEST1 Value: test1$" \
	    -e empty \
	    -s exit:0 \
-
	    pkg annotate -Ay sqlite3 TEST1 test1
+
	    pkg annotate --all --show TEST1

	atf_check \
-
	    -o match:"^png-1.5.18: Tag: TEST1 Value: test1$" \
-
			-o match:"^sqlite3-3.8.6: Tag: TEST1 Value: test1$" \
+
	    -o match:"^png-1.5.18: Deleted annotation tagged: TEST1$" \
+
	    -o match:"^sqlite3-3.8.6: Deleted annotation tagged: TEST1$" \
+
	    -e empty \
+
	    -s exit:0 \
+
	    pkg annotate --yes --all --delete TEST1
+

+
	atf_check \
+
	    -o empty \
	    -e empty \
	    -s exit:0 \
	    pkg annotate --all --show TEST1