|
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)
|
|
}
|
|
}
|