...

Source file src/os/user/cgo_unix_test.go

Documentation: os/user

		 1  // Copyright 2017 The Go Authors. All rights reserved.
		 2  // Use of this source code is governed by a BSD-style
		 3  // license that can be found in the LICENSE file.
		 4  
		 5  //go:build (darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) && cgo && !osusergo
		 6  // +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris
		 7  // +build cgo
		 8  // +build !osusergo
		 9  
		10  package user
		11  
		12  import (
		13  	"testing"
		14  )
		15  
		16  // Issue 22739
		17  func TestNegativeUid(t *testing.T) {
		18  	sp := structPasswdForNegativeTest()
		19  	u := buildUser(&sp)
		20  	if g, w := u.Uid, "4294967294"; g != w {
		21  		t.Errorf("Uid = %q; want %q", g, w)
		22  	}
		23  	if g, w := u.Gid, "4294967293"; g != w {
		24  		t.Errorf("Gid = %q; want %q", g, w)
		25  	}
		26  }
		27  

View as plain text