mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 06:16:41 -04:00
windows: correct NT definitions and add more resolution
Alex pointed out that some of these original types were incomplete, so this commit fills things out a bit more. We also add more to the test case. Change-Id: Iff7bd9ea6e0d021ba997c6d7351fe7c4a46187a9 Reviewed-on: https://go-review.googlesource.com/c/sys/+/299189 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
@@ -560,7 +560,20 @@ func TestPEBFilePath(t *testing.T) {
|
||||
}
|
||||
pebPath := entry.FullDllName.String()
|
||||
if osPath != pebPath {
|
||||
t.Errorf("expected os.Executable() to return same value as peb.Ldr.{entry}.FullDllName - want %#q; got %#q", osPath, pebPath)
|
||||
t.Errorf("peb.Ldr.{entry}.FullDllName = %#q; want %#q", pebPath, osPath)
|
||||
}
|
||||
paramPath := peb.ProcessParameters.ImagePathName.String()
|
||||
if osPath != paramPath {
|
||||
t.Errorf("peb.ProcessParameters.ImagePathName.{entry}.ImagePathName = %#q; want %#q", paramPath, osPath)
|
||||
}
|
||||
osCwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Errorf("unable to get working directory: %v", err)
|
||||
}
|
||||
osCwd = filepath.Clean(osCwd)
|
||||
paramCwd := filepath.Clean(peb.ProcessParameters.CurrentDirectory.DosPath.String())
|
||||
if paramCwd != osCwd {
|
||||
t.Errorf("peb.ProcessParameters.CurrentDirectory.DosPath = %#q; want %#q", paramCwd, osCwd)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user