@@ -183,7 +183,7 @@ func (s *ParserSuite) TestParseWithValidExpression(c *C) {
183183 }
184184}
185185
186- func (s * ParserSuite ) TestParseWithUnValidExpression (c * C ) {
186+ func (s * ParserSuite ) TestParseWithInvalidExpression (c * C ) {
187187 datas := map [string ]error {
188188 ".." : & ErrInvalidRevision {`must not start with "."` },
189189 "master^1master" : & ErrInvalidRevision {`reference must be defined once at the beginning` },
@@ -198,6 +198,9 @@ func (s *ParserSuite) TestParseWithUnValidExpression(c *C) {
198198 "~1" : & ErrInvalidRevision {`"~" or "^" statement must have a reference defined at the beginning` },
199199 "master:/test" : & ErrInvalidRevision {`":" statement is not valid, could be : :/<regexp>` },
200200 "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` },
201204 }
202205
203206 for s , e := range datas {
@@ -230,7 +233,7 @@ func (s *ParserSuite) TestParseAtWithValidExpression(c *C) {
230233 }
231234}
232235
233- func (s * ParserSuite ) TestParseAtWithUnValidExpression (c * C ) {
236+ func (s * ParserSuite ) TestParseAtWithInvalidExpression (c * C ) {
234237 datas := map [string ]error {
235238 "{test}" : & ErrInvalidRevision {`wrong date "test" must fit ISO-8601 format : 2006-01-02T15:04:05Z` },
236239 "{-1" : & ErrInvalidRevision {`missing "}" in @{-n} structure` },
0 commit comments