MCPcopy Index your code
hub / github.com/rilldata/rill / assertPathsEqual

Function assertPathsEqual

cli/pkg/gitutil/gitcmdwrapper_test.go:476–487  ·  view source on GitHub ↗

Helper: compare canonicalized paths

(t *testing.T, p1, p2 string)

Source from the content-addressed store, hash-verified

474
475// Helper: compare canonicalized paths
476func assertPathsEqual(t *testing.T, p1, p2 string) {
477 t.Helper()
478 p1 = filepath.Clean(p1)
479 p2 = filepath.Clean(p2)
480 if r1, err := filepath.EvalSymlinks(p1); err == nil {
481 p1 = r1
482 }
483 if r2, err := filepath.EvalSymlinks(p2); err == nil {
484 p2 = r2
485 }
486 require.Equal(t, p1, p2)
487}
488func setupTestRepository(t *testing.T) (string, string) {
489 tempDir := t.TempDir()
490

Calls

no outgoing calls

Tested by

no test coverage detected