summaryrefslogtreecommitdiffstats
path: root/debian/patches/0002-tests-add-feed.sh-Fix-empty-index-tests.patch
blob: 4a3d33afb92f128475e9b99ca54edec22022ebeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From c265093e1bfe6afb0c381cdee417f7ae3ce5287e Mon Sep 17 00:00:00 2001
From: Patrick McDermott <patrick.mcdermott@libiquity.com>
Date: Mon, 29 Jun 2020 01:46:40 -0400
Subject: [PATCH] tests/add-feed.sh: Fix empty index tests

---
 tests/add-feed.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/add-feed.sh b/tests/add-feed.sh
index 843ede1..53472f8 100755
--- a/tests/add-feed.sh
+++ b/tests/add-feed.sh
@@ -33,7 +33,7 @@ command_ok_ 'feed index exists' -- \
 
 command_ok_ 'feed index is empty' -- \
 	[ $(wc -l 'archive/feeds/dev/trunk/arch1/plat1/sect1/Packages' | \
-		cut -d ' ' -f 1) -eq 0 ]
+		cut -d ' ' -f 1) -eq 1 ]
 
 changes="$(make_opks_and_changes 'foo' 'foo bar' '1.0-1' 'arch1' 'plat1' \
 	'trunk' 'sect1')"
@@ -43,7 +43,7 @@ command_ok_ 'pro-archman include' -- \
 
 command_ok_ 'feed index is non-empty' -- \
 	[ $(wc -l 'archive/feeds/dev/trunk/arch1/plat1/sect1/Packages' | \
-		cut -d ' ' -f 1) -ne 0 ]
+		cut -d ' ' -f 1) -gt 1 ]
 
 command_ok_ 'pro-archman add-feed' -- \
 	"${PRO_ARCHMAN}" -v -b 'archive/' add-feed \
@@ -54,7 +54,7 @@ command_ok_ 'feed index exists' -- \
 
 command_ok_ 'feed index is empty' -- \
 	[ $(wc -l 'archive/feeds/dev/trunk/arch1/plat1/sect2/Packages' | \
-		cut -d ' ' -f 1) -eq 0 ]
+		cut -d ' ' -f 1) -eq 1 ]
 
 command_ok_ 'pro-archman add-feed' -- \
 	"${PRO_ARCHMAN}" -v -b 'archive/' add-feed \
@@ -66,14 +66,14 @@ command_ok_ 'feed index exists' -- \
 
 command_ok_ 'feed index is empty' -- \
 	[ $(wc -l 'archive/feeds/dev/trunk/arch2/plat2/sect1/Packages' | \
-		cut -d ' ' -f 1) -eq 0 ]
+		cut -d ' ' -f 1) -eq 1 ]
 
 command_ok_ 'feed index exists' -- \
 	[ -f 'archive/feeds/dev/trunk/arch2/plat2/sect2/Packages' ]
 
 command_ok_ 'feed index is empty' -- \
 	[ $(wc -l 'archive/feeds/dev/trunk/arch2/plat2/sect2/Packages' | \
-		cut -d ' ' -f 1) -eq 0 ]
+		cut -d ' ' -f 1) -eq 1 ]
 
 command_ok_ 'pro-archman add-feed' -- not \
 	"${PRO_ARCHMAN}" -v -b 'archive/' add-feed \
-- 
2.11.0