tree: d613f29185aff36ab7b9af853de8a6bb2ed0a16f [path history] [tgz]
  1. blank.txt
  2. code.txt
  3. code2.txt
  4. code3.txt
  5. code4.txt
  6. code5.txt
  7. code6.txt
  8. crash1.txt
  9. doclink.txt
  10. doclink2.txt
  11. doclink3.txt
  12. doclink4.txt
  13. doclink5.txt
  14. doclink6.txt
  15. doclink7.txt
  16. escape.txt
  17. head.txt
  18. head2.txt
  19. head3.txt
  20. hello.txt
  21. link.txt
  22. link2.txt
  23. link3.txt
  24. link4.txt
  25. link5.txt
  26. link6.txt
  27. link7.txt
  28. linklist.txt
  29. linklist2.txt
  30. linklist3.txt
  31. linklist4.txt
  32. list.txt
  33. list10.txt
  34. list2.txt
  35. list3.txt
  36. list4.txt
  37. list5.txt
  38. list6.txt
  39. list7.txt
  40. list8.txt
  41. list9.txt
  42. para.txt
  43. quote.txt
  44. README.md
  45. text.txt
  46. text2.txt
  47. text3.txt
  48. text4.txt
  49. text5.txt
  50. text6.txt
  51. text7.txt
  52. text8.txt
  53. text9.txt
  54. words.txt
src/go/doc/comment/testdata/README.md

This directory contains test files (*.txt) for the comment parser.

The files are in txtar format. Consider this example:

-- input --
Hello.
-- gofmt --
Hello.
-- html --
<p>Hello.
-- markdown --
Hello.
-- text --
Hello.

Each -- name -- line introduces a new file with the given name. The file named “input” must be first and contains the input to comment.Parser.

The remaining files contain the expected output for the named format generated by comment.Printer: “gofmt” for Printer.Comment (Go comment format, as used by gofmt), “html” for Printer.HTML, “markdown” for Printer.Markdown, and “text” for Printer.Text. The format can also be “dump” for a textual dump of the raw data structures.

The text before the -- input -- line, if present, is JSON to be unmarshalled to initialize a comment.Printer. For example, this test case sets the Printer's TextWidth field to 20:

{"TextWidth": 20}
-- input --
Package gob manages streams of gobs - binary values exchanged between an
Encoder (transmitter) and a Decoder (receiver).
-- text --
Package gob
manages streams
of gobs - binary
values exchanged
between an Encoder
(transmitter) and a
Decoder (receiver).