mirror of
https://github.com/golang/term.git
synced 2026-02-08 19:56:05 +03:00
ssh/terminal: fix TestMakeRawState on iOS
Fix the following failure on iOS: --- FAIL: TestMakeRawState (0.00s) terminal_test.go:332: failed to get terminal state from MakeRaw: operation not permitted Updates golang/go#25535 Change-Id: I1ab6feb31ba5e89dc0d5f2a1cefd56c09f178e80 Reviewed-on: https://go-review.googlesource.com/114415 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
c0053fbbb3
commit
2f5b78d13e
@@ -10,6 +10,7 @@ import (
|
||||
"bytes"
|
||||
"io"
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -326,6 +327,11 @@ func TestMakeRawState(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get terminal state from GetState: %s", err)
|
||||
}
|
||||
|
||||
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
|
||||
t.Skip("MakeRaw not allowed on iOS; skipping test")
|
||||
}
|
||||
|
||||
defer Restore(fd, st)
|
||||
raw, err := MakeRaw(fd)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user