go cgo_unix_test 源码

  • 2022-07-15
  • 浏览 (891)

golang cgo_unix_test 代码

文件路径:/src/os/user/cgo_unix_test.go

// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build (darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo

package user

import (
	"testing"
)

// Issue 22739
func TestNegativeUid(t *testing.T) {
	sp := structPasswdForNegativeTest()
	u := buildUser(&sp)
	if g, w := u.Uid, "4294967294"; g != w {
		t.Errorf("Uid = %q; want %q", g, w)
	}
	if g, w := u.Gid, "4294967293"; g != w {
		t.Errorf("Gid = %q; want %q", g, w)
	}
}

相关信息

go 源码目录

相关文章

go cgo_listgroups_unix 源码

go cgo_lookup_unix 源码

go getgrouplist_darwin 源码

go getgrouplist_unix 源码

go listgroups_stub 源码

go listgroups_unix 源码

go listgroups_unix_test 源码

go lookup 源码

go lookup_android 源码

go lookup_plan9 源码

0  赞