show-rss/main_test.go

18 lines
272 B
Go

package main_test
import (
"context"
main "show-rss"
"testing"
"time"
)
func TestMain(t *testing.T) {
ctx, can := context.WithTimeout(context.Background(), 2*time.Second)
defer can()
if err := main.Main(ctx); err != nil && ctx.Err() == nil {
t.Fatal(err)
}
}