package cmdutil import ( "path/filepath" "testing" ) func TestResolvePosition(t *testing.T) { a := PositionArgs{Path: "src/main.go", Line: "12", Col: "7"} file, line, col := a.ResolvePosition() if abs, _ := filepath.Abs(a.Path); file != abs || line != 11 || col != 6 { t.Fatalf("got %q,%d,%d want %q,11,6", file, line, col, abs) } }