2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 19:38:57 +00:00
restic/internal/ui/termstatus/background_linux_test.go

21 lines
317 B
Go
Raw Normal View History

package termstatus
import (
"os"
"testing"
rtest "github.com/restic/restic/internal/test"
)
func TestIsProcessBackground(t *testing.T) {
tty, err := os.Open("/dev/tty")
if err != nil {
t.Skipf("can't open terminal: %v", err)
}
_, err = isProcessBackground(tty.Fd())
rtest.OK(t, err)
2021-01-30 18:35:46 +00:00
_ = tty.Close()
}