Fix tests and linters

This commit is contained in:
Daniel
2022-02-02 12:48:42 +01:00
parent f2fcad4d11
commit 60d8664e7b
171 changed files with 944 additions and 874 deletions

View File

@@ -3,6 +3,8 @@ package profile
import "testing"
func testPathID(t *testing.T, execPath, identifierPath string) {
t.Helper()
result := GetPathIdentifier(execPath)
if result != identifierPath {
t.Errorf("unexpected identifier path for %s: got %s, expected %s", execPath, result, identifierPath)
@@ -10,6 +12,8 @@ func testPathID(t *testing.T, execPath, identifierPath string) {
}
func TestGetPathIdentifier(t *testing.T) {
t.Parallel()
testPathID(t, "/bin/bash", "bin/bash")
testPathID(t, "/home/user/bin/bash", "bin/bash")
testPathID(t, "/home/user/project/main", "project/main")