![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Gregory Beaver schrieb: Hello Gregory, after a while, spending time on this code, I'm back... > > Are there any infos on the PEAR website about phpt? For example > > RunTest.php knows the sections "FAIL" and "RETURNS", which aren't > > described on [1]. "UPLOAD" is also a section not really used in "run-tests.php". But a good idea. > --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? There are also some other problems. Let me remmeber: - ENV and COOKIE and test whitch require the cgi-binary are not working with PHP4 - RETURNS does not work with all PHP binarys (depends on the configure options) and OS - POST_RAW does not allow a real raw http message, according to the rfc - does not work correct on Win9x - 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 - tap output is not correct - wrong test summary if you use top output (I hope, I have not forgotten one...) So in the current form, I don't think you can recommend this test [1]. 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? Regards, Carsten [1] http://pear.php.net/manual/en/develo...g.requirements [2] http://pear.php.net/manual/en/develo...ting.howto.php | |||
|
| Advertisements |
| | #2 | ||
| Carsten Wiedmann wrote: >> --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. > There are also some other problems. Let me remmeber: > - ENV and COOKIE and test whitch require the cgi-binary are not working > with PHP4 > - RETURNS does not work with all PHP binarys (depends on the configure > options) and OS > - POST_RAW does not allow a real raw http message, according to the rfc > - does not work correct on Win9x Win9x is not supported by PHP and I do not have a working Win9x box, the last one died over 3 years ago. > - 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 > - tap output is not correct > - wrong test summary if you use top output > (I hope, I have not forgotten one...) 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 Seriuosly though, I have had absolutely no trouble running unit tests on windows, OS X, freebsd and linux. I personally use the --cgi option on windows and linux regularly. Additionally, the code is a direct port of the code in php-src/runtests.php - don't you think that someone would have noticed before if the code was broken for any other test environments? Perhaps your system is unique. TAP output is valid, I don't know what you're talking about. Frankly your list is frustrating because none of the claims are substantiated with a test, and there isn't a single open bug for any of these issues. Please put the proof out for all to see and I will take these claims more seriously. > 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. > 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 Greg | |||
|
| | #3 | ||
| Greg Beaver schrieb: > > > --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. 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) > 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 Thanks, 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 | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: done, phpt |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Featured Websites | ||||
|