Re: PHPT ===DONE===
| From: | Carsten Wiedmann | Date: | Sat, 12 May 2007 23:23:12 +0000 |
| Subject: | Re: PHPT ===DONE=== | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27279@lists.php.net to get a copy of this message | ||
Greg Beaver schrieb:
No, it's just the way you have provided the expected output too. Have you ever changed only the return value, for example in ".\tests\PEAR_Command_Registry\shell-test\test_rel_ne.phpt", from "0" to "1" on a Unix system? (BTW: On Unix, PHP may not be built whith --enable-sigchild if you want use RETURNS with the current code)--RETURNS-- is used to test the return value for scripts that are used in shell scripts.That's also a good idea. But why want you have this feature only on Windows? ???? It works on all OSes.
Win9x is not supported by PHP and I do not have a working Win9x box, the last one died over 3 years ago.That's wrong [1]. But the PEAR command line tool does not work on Win9x. That's true. BTW: I know a lot of people, which allways (must) use Win9x. And they are also interested in learning/using PHP (and maybe PEAR).
If these are true, then it is your responsibility to open bugs. This is open source and I cannot use my considerable powers of ESP to divine al possible bugs, only most of them ;).Sorry, I thought you know about these problems. And so this is at first a list for information. OK, I can open bug reports, or better one. Many things depends on each other. For me I have now a working version of this tool. But it's a little bit away from your code... I can upload my current version (with a diff) to a webserver, so you or someone other can look on this.
Seriuosly though, I have had absolutely no trouble running unit tests on windows, OS X, freebsd and linux.But I had these problems. And that was the point I have start my work with this code.
I personally use the --cgi option on windows and linux regularly.But not with PHP4. You are using PHP5, or not? --> The current test can't use the environment with PHP4.
Additionally, the code is a direct port of the code in php-src/runtests.php -IMHO that's the problem. They are using this test to test a specific PHP version itself. And I (or we) want use it, to test if our php code is working correct (under several conditions (os/php versions)).
TAP output is valid, I don't know what you're talking about.| node2# bin/pear run-tests -t PEAR_RunTest/ | Running 3 tests | FAIL PEAR_RunTest --INI--[filename] | SKIP PEAR_RunTest --POST--[filename] (reason: ...) | PASS PEAR_RunTest improve diff of failing EXPECTF test[filename] | wrote TAP-format log to "run-tests.log" | TOTAL TIME: 00:07 | 0 PASSED TESTS | 0 SKIPPED TESTS --^ <-- here | node2# cat run-tests.log | 1..3 | # Expected output: | # | #tring(5) "hooba"# | # | # Actual output: | # | #string(5) "hooba"not ok 1 - PEAR_RunTest --INI--[filename] --------------------^ <--- here | ok 2 # skip --cgi ... | ok 3 - PEAR_RunTest improve diff of failing EXPECTF test[filename] | node2# I don't think that this is correct.
- does not work with spaces in pathnames - does not work with spaces in pathnames - does not work if the phpt files uses "\r" for lineendings - does not work if you use the cgi binary for pear. - the second parameter from run() can only be used for the PhpUnit test Please put the proof out for all to see and I will take these claims more seriously.Better you try this points yourself... It's hard to show this. Or want you have a copy 'n paste from the shell for each point?
So in the current form, I don't think you can recommend this test [1]. Au contraire. It is an extremely battle-tested, robust testing format responsible for oodles of great testing over the past several years.But it's a nice tool and easy to use. The only problem was, it have not worked on all /my/ test installations/environments.
Another question: Why is the value for the doc block tag "@category" "pear" (in all PEAR files)? If I read this [2] correct, it should be "PEAR", or not? phpDocumentor lower-cases this value in the only converter that needs it, the XML:DocBook/peardoc2 converterThanks, so I have to change this back in my code. (phpcs also mark this as an error) Regards, Carsten [1] http://de.php.net/manual/en/install.windows.php