Forráskód Böngészése

Updated vendored packages

Jguer 7 éve
szülő
commit
4218a47ef2

+ 1 - 1
Gopkg.lock

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

+ 6 - 2
vendor/github.com/mikkeloscar/gopkgbuild/lex.go

@@ -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()

+ 1 - 0
vendor/github.com/mikkeloscar/gopkgbuild/pkgbuild_test.go

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

+ 1 - 1
vendor/github.com/mikkeloscar/gopkgbuild/version.go

@@ -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

+ 8 - 0
vendor/github.com/mikkeloscar/gopkgbuild/version_test.go

@@ -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++ {