package understanding_test import ( "path/filepath" "testing" ) func TestFilepathJoin(t *testing.T) { if filepath.Join("a", "/b") != "a/b" { t.Errorf("incorrect stdlib understanding") } if filepath.Join("a", "../b") != "b" { t.Errorf("incorrect stdlib understanding") } if filepath.Join("a", filepath.Join("/", "../b")) != "a/b" { t.Errorf("incorrect stdlib understanding") } }