github.com/lheiskan/zebrapack@v4.1.1-0.20181107023619-e955d028f9bf+incompatible/cmd/addzid/ignored_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing"
     5  
     6  	cv "github.com/glycerine/goconvey/convey"
     7  )
     8  
     9  func Test911AddZidIgnoresUnserializedFields(t *testing.T) {
    10  
    11  	cv.Convey("Given a struct with a field that has a msg:\"-\" tag, ", t, func() {
    12  		cv.Convey("then addzid to should ignore that field, and not add a zid to it..", func() {
    13  			in1 := "type HasUnserz struct {Jobid int ` msg: \"-\" `}"
    14  			ex1 := "package main type HasUnserz struct {Jobid int `msg:\"-\"`}"
    15  			added := ExtractStringAddZid(in1)
    16  			//p("added='%v'", added)
    17  			cv.So(added, ShouldStartWithModuloWhiteSpace, ex1)
    18  		})
    19  	})
    20  }