mirror of
https://github.com/octoleo/restic.git
synced 2024-12-27 12:42:49 +00:00
21 lines
317 B
Go
21 lines
317 B
Go
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)
|
|
|
|
_ = tty.Close()
|
|
}
|