aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/doc/doc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/doc/doc_test.go')
-rw-r--r--src/cmd/doc/doc_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cmd/doc/doc_test.go b/src/cmd/doc/doc_test.go
index 454a0d6415..e534bfead3 100644
--- a/src/cmd/doc/doc_test.go
+++ b/src/cmd/doc/doc_test.go
@@ -390,6 +390,29 @@ var tests = []test{
nil,
},
+ // Field.
+ {
+ "field",
+ []string{p, `ExportedType.ExportedField`},
+ []string{
+ `ExportedField int`,
+ `Comment before exported field.`,
+ `Comment on line with exported field.`,
+ },
+ nil,
+ },
+
+ // Field with -u.
+ {
+ "method with -u",
+ []string{"-u", p, `ExportedType.unexportedField`},
+ []string{
+ `unexportedField int`,
+ `Comment on line with unexported field.`,
+ },
+ nil,
+ },
+
// Case matching off.
{
"case matching off",