kzykhys / Ciconia

A New Markdown parser for PHP5.4
http://ciconia.kzykhys.com/
MIT License
355 stars 31 forks source link

Duplicate tests in the test-suite #58

Open mindplay-dk opened 8 years ago

mindplay-dk commented 8 years ago

I can understand duplicating certain tests when there is overlap between two test-suites:

2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/core/em-spaces.md|out
- kzykhys/ciconia/test/Ciconia/Resources/gfm/em-spaces.md|out
2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/list-multiparagraphs.md|out
- kzykhys/ciconia/test/Ciconia/Resources/gfm/ws-list-multiparagraphs.md|out
2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/gfm/table-invalid-body.md|out
- kzykhys/ciconia/test/Ciconia/Resources/options/strict/gfm/table-invalid-body.md|out

But what's the purpose of tests duplicated within the same test-suite?

2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/EOL-CR+LF.md|out
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/EOL-LF.md|out
2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/inline-code-with-visible-backtick.md|out
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/inline-code.md|out
2 duplicates:
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/unordered-list-items-leading-1space.md|out
- kzykhys/ciconia/test/Ciconia/Resources/core/markdown-testsuite/unordered-list-items.md|out

I inspected the EOL-CR+LF.md and EOL-LF.md in a hex editor as per your note, and these files are identical, as far as I can tell - and they both appear (on github.com) to be precisely 119 bytes, which, if one has CR+LF bytes for line breaks, it should have slightly more bytes than the one that has only LF bytes, correct?

Perhaps your IDE or some other tool, at some point, cleaned up what was deliberately intended to be leading/trailing space for test purposes?

I hope this is helpful :-)

mindplay-dk commented 8 years ago

On a related note, if you want to make sure the files are checked out (and commited) as-is, you should probably add a .gitattributes file with a line like *.md -text - and probably *.out -text as well, if you want to make sure people check out the files correctly, so that tests produce the same results regardless of Git user preferences on each system.