| 1 | import flag |
| 2 | |
| 3 | struct QuotedXdocConfig { |
| 4 | p_fpga_ver string @[long: fp_ver; name: 'FPGA Version'; xdoc: 'String to use as simulated FPGA version in Version responses. Must be in the form "a.bb.cccc"'] |
| 5 | p_cm_ver string @[long: cm_ver; name: 'CM Version'; xdoc: 'String to use as simulated CM version in Version responses. Must be in the form "a.bb.cccc"'] |
| 6 | } |
| 7 | |
| 8 | fn test_flag_to_doc_with_quoted_xdoc_attrs() { |
| 9 | doc := flag.to_doc[QuotedXdocConfig]()! |
| 10 | assert doc.contains('--fp-ver <string>') |
| 11 | assert doc.contains('--cm-ver <string>') |
| 12 | assert doc.contains('Must be in the form "a.bb.cccc"') |
| 13 | } |
| 14 | |