Sha256: 321b21d0c1c4acd76ae02c5b6137581c8c438011f96ddbc30b4625cd4b48b7d7
Contents?: true
Size: 399 Bytes
Versions: 12
Compression:
Stored size: 399 Bytes
Contents
package main import ( "testing" ) func TestGetFileOwnerGroup(t *testing.T) { statFile = func(path string) string { return "foo:bar" } path := "/etc/passwd" owner, group := getFileOwnerGroup(path) if owner != "foo" { t.Errorf("GetFileOwner('%v') = '%v', want '%v'", path, owner, "foo") } if group != "bar" { t.Errorf("GetFileOwner('%v') = '%v', want '%v'", path, owner, "bar") } }
Version data entries
12 entries across 12 versions & 1 rubygems