all: fix some typos

Change-Id: Id4bf4ce8aee8b98baa2f1a9c62a72a9554f7d557
Reviewed-on: https://go-review.googlesource.com/c/sys/+/510595
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
cui fliter
2023-07-18 11:10:42 +08:00
committed by Gopher Robot
parent 25d0004552
commit c406141231
4 changed files with 9 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ func Test_anyToSockaddr_darwin(t *testing.T) {
err error
}{
{
name: "AF_SYSTEM emtpy",
name: "AF_SYSTEM empty",
rsa: sockaddrCtlToAny(RawSockaddrCtl{}),
err: EAFNOSUPPORT,
},
@@ -51,7 +51,7 @@ func Test_anyToSockaddr_darwin(t *testing.T) {
},
},
{
name: "AF_VSOCK emtpy",
name: "AF_VSOCK empty",
rsa: sockaddrVMToAny(RawSockaddrVM{}),
err: EAFNOSUPPORT,
},

View File

@@ -254,7 +254,7 @@ func Test_anyToSockaddr(t *testing.T) {
proto: makeProto(^0),
},
{
name: "AF_VSOCK emtpy",
name: "AF_VSOCK empty",
rsa: sockaddrVMToAny(RawSockaddrVM{}),
err: EAFNOSUPPORT,
},

View File

@@ -163,7 +163,7 @@ func TestIsAnInteractiveSession(t *testing.T) {
t.Fatal(err)
}
if !isInteractive {
t.Error("IsAnInteractiveSession retuns false when running interactively.")
t.Error("IsAnInteractiveSession returns false when running interactively.")
}
}
@@ -173,7 +173,7 @@ func TestIsWindowsService(t *testing.T) {
t.Fatal(err)
}
if isSvc {
t.Error("IsWindowsService retuns true when not running in a service.")
t.Error("IsWindowsService returns true when not running in a service.")
}
}
@@ -206,7 +206,7 @@ func TestIsWindowsServiceWhenParentExits(t *testing.T) {
msg = err.Error()
}
if isSvc {
msg = "IsWindowsService retuns true when not running in a service."
msg = "IsWindowsService returns true when not running in a service."
}
err = ioutil.WriteFile(dumpPath, []byte(msg), 0644)
if err != nil {
@@ -235,12 +235,12 @@ func TestIsWindowsServiceWhenParentExits(t *testing.T) {
}
time.Sleep(100 * time.Millisecond)
if i > 10 {
t.Fatal("timed out waiting for child ouput file to be created.")
t.Fatal("timed out waiting for child output file to be created.")
}
}
childOutput, err := ioutil.ReadFile(childDumpPath)
if err != nil {
t.Fatalf("reading child ouput failed: %v", err)
t.Fatalf("reading child output failed: %v", err)
}
if got, want := string(childOutput), ""; got != want {
t.Fatalf("child output: want %q, got %q", want, got)

View File

@@ -226,7 +226,7 @@ func TestKnownFolderPath(t *testing.T) {
func TestRtlGetVersion(t *testing.T) {
version := windows.RtlGetVersion()
major, minor, build := windows.RtlGetNtVersionNumbers()
// Go is not explictly added to the application compatibility database, so
// Go is not explicitly added to the application compatibility database, so
// these two functions should return the same thing.
if version.MajorVersion != major || version.MinorVersion != minor || version.BuildNumber != build {
t.Fatalf("%d.%d.%d != %d.%d.%d", version.MajorVersion, version.MinorVersion, version.BuildNumber, major, minor, build)