mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-25 19:21:18 -08:00
Also port pkgdoc, into the tempfork folder Port was verbatim, except mentions of "corp" were changed to "tailscale" Fixes #19470 Change-Id: If865889803b5e89d3047dfd2f970e3e4ce48d2d9 Signed-off-by: Walter Poupore <[email protected]>
21 lines
471 B
Go
21 lines
471 B
Go
package pkgdoc
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestPkgdoc(t *testing.T) {
|
|
abs, err := filepath.Abs(".")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
got, err := PackageDoc(abs)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
const want = "package pkgdoc // import \".\"\n\nPackage pkgdoc is a library-ified fork of Go's cmd/doc program that only does\nwhat we need for misc/genreadme.\n"
|
|
if string(got) != want {
|
|
t.Fatalf("PackageDoc(%q) = %q; want %q", abs, got, want)
|
|
}
|
|
} |