@@ -183,7 +183,7 @@ func (s *ParserSuite) TestParseWithValidExpression(c *C) {
183
183
}
184
184
}
185
185
186
- func (s * ParserSuite ) TestParseWithUnValidExpression (c * C ) {
186
+ func (s * ParserSuite ) TestParseWithInvalidExpression (c * C ) {
187
187
datas := map [string ]error {
188
188
".." : & ErrInvalidRevision {`must not start with "."` },
189
189
"master^1master" : & ErrInvalidRevision {`reference must be defined once at the beginning` },
@@ -198,6 +198,9 @@ func (s *ParserSuite) TestParseWithUnValidExpression(c *C) {
198
198
"~1" : & ErrInvalidRevision {`"~" or "^" statement must have a reference defined at the beginning` },
199
199
"master:/test" : & ErrInvalidRevision {`":" statement is not valid, could be : :/<regexp>` },
200
200
"master:0:README" : & ErrInvalidRevision {`":" statement is not valid, could be : :<n>:<path>` },
201
+ "^{/" : & ErrInvalidRevision {`missing "}" in ^{<data>} structure` },
202
+ "~@{" : & ErrInvalidRevision {`missing "}" in @{<data>} structure` },
203
+ "@@{{0" : & ErrInvalidRevision {`missing "}" in @{<data>} structure` },
201
204
}
202
205
203
206
for s , e := range datas {
@@ -230,7 +233,7 @@ func (s *ParserSuite) TestParseAtWithValidExpression(c *C) {
230
233
}
231
234
}
232
235
233
- func (s * ParserSuite ) TestParseAtWithUnValidExpression (c * C ) {
236
+ func (s * ParserSuite ) TestParseAtWithInvalidExpression (c * C ) {
234
237
datas := map [string ]error {
235
238
"{test}" : & ErrInvalidRevision {`wrong date "test" must fit ISO-8601 format : 2006-01-02T15:04:05Z` },
236
239
"{-1" : & ErrInvalidRevision {`missing "}" in @{-n} structure` },
0 commit comments