github.com/markusbkk/elvish@v0.0.0-20231204143114-91dc52438621/pkg/testutil/recover_test.go (about)

     1  package testutil
     2  
     3  import (
     4  	"testing"
     5  
     6  	. "github.com/markusbkk/elvish/pkg/tt"
     7  )
     8  
     9  func TestRecover(t *testing.T) {
    10  	Test(t, Fn("Recover", Recover), Table{
    11  		Args(func() {}).Rets(nil),
    12  		Args(func() {
    13  			panic("unreachable")
    14  		}).Rets("unreachable"),
    15  	})
    16  }