New upstream version 1.1.1

This commit is contained in:
Sébastien Delafond
2017-11-02 08:56:43 +01:00
parent c926f2bf05
commit ee9fb8dfec
356 changed files with 656439 additions and 643115 deletions
+4 -8
View File
@@ -1,10 +1,6 @@
package query
import (
"fmt"
. "gopkg.in/check.v1"
)
import . "gopkg.in/check.v1"
type LexerSuite struct {
}
@@ -46,13 +42,13 @@ func (s *LexerSuite) TestConsume(c *C) {
func (s *LexerSuite) TestString(c *C) {
l, _ := lex("query", "package (<< 1.3)")
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "\"package\"")
c.Check(l.Current().String(), Equals, "\"package\"")
l.Consume()
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "(")
c.Check(l.Current().String(), Equals, "(")
}
func (s *LexerSuite) TestError(c *C) {
l, _ := lex("query", "'package")
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "error: unexpected eof in quoted string")
c.Check(l.Current().String(), Equals, "error: unexpected eof in quoted string")
}
+1 -1
View File
@@ -49,7 +49,7 @@ func (s *SyntaxSuite) TestParsing(c *C) {
c.Assert(err, IsNil)
c.Check(q, DeepEquals, &deb.DependencyQuery{Dep: deb.Dependency{Pkg: "package", Relation: deb.VersionRegexp, Version: "5\\.3.*~dev",
Regexp: regexp.MustCompile("5\\.3.*~dev")}})
Regexp: regexp.MustCompile(`5\.3.*~dev`)}})
l, _ = lex("query", "alien-data_1.3.4~dev_i386")
q, err = parse(l)