signature_test.go 531 B

1234567891011121314151617181920
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package git
  5. import (
  6. "testing"
  7. . "github.com/smartystreets/goconvey/convey"
  8. )
  9. func Test_newSignatureFromCommitline(t *testing.T) {
  10. Convey("Parse signature from commit line", t, func() {
  11. line := "Intern <intern@macbook-intern.(none)> 1445412825 +0200"
  12. sig, err := newSignatureFromCommitline([]byte(line))
  13. So(err, ShouldBeNil)
  14. So(sig, ShouldNotBeNil)
  15. })
  16. }