...

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  
     7  package user
     8  
     9  import (
    10  	"testing"
    11  )
    12  
    13  // Issue 22739
    14  func TestNegativeUid(t *testing.T) {
    15  	sp := structPasswdForNegativeTest()
    16  	u := buildUser(&sp)
    17  	if g, w := u.Uid, "4294967294"; g != w {
    18  		t.Errorf("Uid = %q; want %q", g, w)
    19  	}
    20  	if g, w := u.Gid, "4294967293"; g != w {
    21  		t.Errorf("Gid = %q; want %q", g, w)
    22  	}
    23  }
    24  

View as plain text