// This test's coverage will not be available in same report bec it runs test in subprocess.
This test's coverage will not be available in same report bec it runs test in subprocess.
// This test ' s coverage will not be available in same report bec it runs test in subprocess .
func TestCLogger_Fatal(t *testing.T) {
	for n := range clogTestCases {
		tt := clogTestCases[n]
		t.Run(tt.name, func(t *testing.T) {
			t.Parallel()
			if os.Getenv("TRIGGER_FATAL") == "1" {
				out := &bytes.Buffer{}
				cl := &CLogger{
					Logger: log.New(out, "", log.Lmsgprefix),
				}
				cl.Fatal(tt.a...)
				return
			}
			prog := os.Args[0]
			cmd := exec.Command(prog, "-test.run=TestCLogger_Fatal")
			cmd.Env = append(os.Environ(), "TRIGGER_FATAL=1")
			err := cmd.Run()
			if e, ok := err.(*exec.ExitError); ok && !e.Success() {
				return
			}
			t.Errorf("want: exist status 1, got: %v", err)
		})
	}
}
func TestCLogger_Fatal ( t * testing . T ) { for n := range clogTestCases { tt := clogTestCases [ n ] t . Run ( tt . name , func ( t * testing . T ) { t . Parallel ( ) if os . Getenv ( " " ) == " " { out := & bytes . Buffer { } cl := & CLogger { Logger : log . New ( out , " " , log . Lmsgprefix ) , } cl . Fatal ( tt . a ... ) return } prog := os . Args [ 0 ] cmd := exec . Command ( prog , " " ) cmd . Env = append ( os . Environ ( ) , " " ) err := cmd . Run ( ) if e , ok := err . ( * exec . ExitError ) ; ok && ! e . Success ( ) { return } t . Errorf ( " " , err ) } ) } }
This test's coverage will not be available in same report bec it runs test in subprocess.
This test ' s coverage will not be available in same report bec it runs test in subprocess .