Updated vendored packages

This commit is contained in:
Jguer 2018-01-19 23:32:07 +09:00
parent 51b2f02eb8
commit 4218a47ef2
No known key found for this signature in database
GPG key ID: 09754DBECF21746F
5 changed files with 17 additions and 4 deletions

2
Gopkg.lock generated
View file

@ -17,7 +17,7 @@
branch = "master"
name = "github.com/mikkeloscar/gopkgbuild"
packages = ["."]
revision = "a8070a8ab45a0f8cd4201ca7ed0f3efe4897bd2f"
revision = "56a112d1afcdea979889939526de04150d599bc1"
[solve-meta]
analyzer-name = "dep"

View file

@ -201,9 +201,13 @@ func lexEnv(l *lexer) stateFn {
case isAlphaNumericUnderscore(r):
return lexVariable
case r == '\n':
if l.input[l.start:l.pos] == "\n\n" {
buffer := l.input[l.start:l.pos]
if buffer == "\n" {
if l.peek() == '\n' {
l.next()
l.emit(itemEndSplit)
}
l.ignore()
l.emit(itemEndSplit)
}
case r == '\t':
l.ignore()

View file

@ -178,6 +178,7 @@ func TestRandomCoreSRCINFOs(t *testing.T) {
"systemd",
"linux",
"pip2pkgbuild",
"biicode",
}
for _, srcinfo := range srcinfos {

View file

@ -16,7 +16,7 @@ type CompleteVersion struct {
}
func (c *CompleteVersion) String() string {
return fmt.Sprintf("%d-%s-%d", c.Epoch, c.Version, c.Pkgrel)
return fmt.Sprintf("%d:%s-%s", c.Epoch, c.Version, c.Pkgrel)
}
// NewCompleteVersion creates a CompleteVersion including basic version, epoch

View file

@ -116,6 +116,14 @@ func TestCompleteVersionComparison(t *testing.T) {
}
}
func TestCompleteVersionString(t *testing.T) {
str := "42:3.14-1"
version, _ := NewCompleteVersion(str)
if version.String() != str {
t.Errorf("%v should equal %s", version, str)
}
}
// Benchmark rpmvercmp
func BenchmarkVersionCompare(b *testing.B) {
for i := 0; i < b.N; i++ {