4
if [ "x$TESTINCSETUP" != "xissetup" ] ; then
5
source $(dirname $0)/test.inc
8
# different tests to check the error messages when accessing
9
# architectures components or packagetypes...
12
cat > conf/options <<EOF
16
cat > conf/distributions <<EOF
18
Architectures: te/st all source
22
testrun - -b . update 3<<EOF
23
*=Error parsing ./conf/distributions, line 2, column 16: Malformed Architectures element 'te/st': '/' is not allowed
24
-v0*=There have been errors!
28
sed -i -e 's#te/st#test#' conf/distributions
30
testrun - -b . update 3<<EOF
31
*=Error: Distribution codename contains an architecture called 'all'.
32
-v0*=There have been errors!
36
sed -i -e 's#\<all\>#a|l#' conf/distributions
38
testrun - -b . update 3<<EOF
39
*=Error parsing ./conf/distributions, line 2, column 21: Malformed Architectures element 'a|l': '|' is not allowed
40
-v0*=There have been errors!
44
sed -i -e 's#\<a|l\>##' -e 's#component#compo|nent#' conf/distributions
46
testrun - -b . update 3<<EOF
47
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element 'compo|nent': '|' is not allowed
48
-v0*=There have been errors!
52
sed -i -e 's#compo|nent#.#' conf/distributions
54
testrun - -b . update 3<<EOF
55
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element '.': '.' is not allowed as directory part
56
-v0*=There have been errors!
60
sed -i -e 's# .$# ./test#' conf/distributions
62
testrun - -b . update 3<<EOF
63
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element './test': '.' is not allowed as directory part
64
-v0*=There have been errors!
68
sed -i -e 's# ./test$# bla/./test#' conf/distributions
70
testrun - -b . update 3<<EOF
71
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element 'bla/./test': '.' is not allowed as directory part
72
-v0*=There have been errors!
76
sed -i -e 's# bla/./test$# bla/../test#' conf/distributions
78
testrun - -b . update 3<<EOF
79
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element 'bla/../test': '..' is not allowed as directory part
80
-v0*=There have been errors!
84
sed -i -e 's#/test$##' conf/distributions
86
testrun - -b . update 3<<EOF
87
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element 'bla/..': '..' is not allowed as directory part
88
-v0*=There have been errors!
92
sed -i -e 's#bla/##' conf/distributions
94
testrun - -b . update 3<<EOF
95
*=Error parsing ./conf/distributions, line 3, column 13: Malformed Components element '..': '..' is not allowed as directory part
96
-v0*=There have been errors!
100
sed -i -e 's#\.\.#component#' -e 's#Components#UdebComponents#' conf/distributions
102
testrun - -b . update 3<<EOF
103
*=Error parsing ./conf/distributions, line 3, column 16:
104
*= A 'UDebComponents'-field is only allowed after a 'Components'-field.
105
-v0*=There have been errors!
109
ed -s conf/distributions <<EOF
117
testrun - -b . update 3<<EOF
118
*=Error parsing ./conf/distributions, line 4, column 17: 'component' not allowed in UDebComponents as it was not in Components.
119
-v0*=There have been errors!
123
sed -i -e 's#test$#test component#' conf/distributions
124
cat >> conf/distributions <<EOF
125
ContentsArchitectures: bla
128
testrun - -b . update 3<<EOF
129
*=Error parsing ./conf/distributions, line 5, column 24: 'bla' not allowed in ContentsArchitectures as it was not in Architectures.
130
-v0*=There have been errors!
134
sed -i -e 's#ContentsArchitectures#ContentsComponents#' conf/distributions
136
testrun - -b . update 3<<EOF
137
*=Error parsing ./conf/distributions, line 5, column 21: 'bla' not allowed in ContentsComponents as it was not in Components.
138
-v0*=There have been errors!
142
sed -i -e 's#ContentsComponents: bla#ContentsUComponents: test#' conf/distributions
144
testrun - -b . update 3<<EOF
145
*=Error parsing ./conf/distributions, line 5, column 22: 'test' not allowed in ContentsUComponents as it was not in UDebComponents.
146
-v0*=There have been errors!
150
sed -i -e 's#ContentsUComponents: test#ContentsUComponents: component#' conf/distributions
152
testrun - -b . -A test update 3<<EOF
153
*=Action 'update' cannot be restricted to an architecture!
154
*=neither --archiecture nor -A make sense here.
155
*=To ignore use --ignore=unusedoption.
156
-v0*=There have been errors!
159
testrun - -b . -C test update 3<<EOF
160
*=Action 'update' cannot be restricted to a component!
161
*=neither --component nor -C make sense here.
162
*=To ignore use --ignore=unusedoption.
163
-v0*=There have been errors!
166
testrun - -b . -T dsc update 3<<EOF
167
*=Action 'update' cannot be restricted to a packagetype!
168
*=neither --packagetype nor -T make sense here.
169
*=To ignore use --ignore=unusedoption.
170
-v0*=There have been errors!
174
testrun - -b . -A test remove codename nothing 3<<EOF
175
-v0*=Not removed as not found: nothing
177
testrun - -b . -A bla remove codename nothing 3<<EOF
178
*=Error: Architecture 'bla' as given to --architecture is not know.
179
*=(it does not appear as architecture in ./conf/distributions (did you mistype?))
180
-v0*=There have been errors!