fp / testo
提取测试示例并将其放入文档
dev-master
2013-10-11 13:36 UTC
Requires
- php: >=5.3.2
This package is auto-updated.
Last update: 2024-09-06 23:46:45 UTC
README
你还记得那些过时的示例吗?
或者当你更新文档时,你不得不手动测试示例的情况?
这些日子已经过去了。Testo 正在发挥作用。
示例
假设你有一个 README.md
@testo examples/Testo/Examples/README.md {
Some description of the awesome code:
<?php
@testo Testo\Examples\Hello world {
echo 'hello world!';
@testo 1abb62086e2cc233ede1e19de3a8e5f6 }
?>
@testo 35a8d2d426c05614551484dcdd450f37 }
并且有一个类
// @testo Testo\Examples\Hello { // @testo }
所以运行 Testo
后,会有一个干净的 README.md
@testo examples/Testo/Examples/README.md.expected {
Some description of the awesome code:
<?php
@testo Testo\Examples\Hello world {
echo 'hello world!';
@testo 1abb62086e2cc233ede1e19de3a8e5f6 }
?>
@testo 35a8d2d426c05614551484dcdd450f37 }
里面有什么内容?
<?php // @testo Testo\Examples\ReadmeTest whatsInside { // @testo }