[Issue 15460] Ddoc: merge the opening comment "<!-- Generated by Ddoc from filename.dd -->" into the default definition of DDOC

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Dec 18 19:28:34 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15460

--- Comment #15 from Adam D. Ruppe <destructionator at gmail.com> ---
Walter:
"I suppose that other web frameworks don't have this problem because they don't
check the output."

You check the output by looking for the relevant piece(s) for your test, not by
considering any changed byte in the whole file to be a test failure.

This is the other thing I was considering writing about this weekend btw,
writing meaningful tests. The parts of ddoc that are tricky are escaping, code
highlighting, sections, macro expansion, recursive macro expansion, and the
other few special features like _notEscaped and `code`. Checking that macro
expansion correctly trims whitespace is a useful test too, but an independent
once.

Comparing the actual definitions of the macros is a waste of everyone's time.
Ddoc isn't broken because someone changed `B=<b>$0</b>` to be `B=<span
style="font-weight: bold;>$0</span>` for example. You can argue that's silly,
but it isn't broken - ddoc isn't supposed to care about exactly what the macros
are defined to be.

--


More information about the Digitalmars-d-bugs mailing list