MCPcopy
hub / github.com/Jguer/yay / sanitizeCall

Function sanitizeCall

sync_test.go:742–761  ·  view source on GitHub ↗
(s, tmpDir, makepkg, pacman, git string)

Source from the content-addressed store, hash-verified

740}
741
742func sanitizeCall(s, tmpDir, makepkg, pacman, git string) string {
743 _, after, found := strings.Cut(s, makepkg)
744 if found {
745 s = "makepkg" + after
746 }
747
748 _, after, found = strings.Cut(s, pacman)
749 if found {
750 s = "pacman" + after
751 }
752
753 _, after, found = strings.Cut(s, git)
754 if found {
755 s = "git" + after
756 }
757
758 s = strings.ReplaceAll(s, tmpDir, "/testdir")
759
760 return s
761}
762
763func TestSyncUpgrade_NoCombinedUpgrade(t *testing.T) {
764 t.Parallel()

Callers 2

sanitizeCallsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected