# [PATCH] tests/classes/factory_and_singleton_009.phpt

- Thread: https://externals.io/message/12946
- Original archive: https://news-web.php.net/php.internals/12946
- Started by Kamesh Jayachandran on 2004-09-23T11:15:30+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #12946 — Kamesh Jayachandran — 2004-09-23T11:15:30+00:00

URL: https://externals.io/message/12946#12946

Hi Helly,
I had the tests/classes/factory_and_singleton_009.phpt testcase failing
in Linux, NetWare, Windows ports of PHP.
And found that this failure is due to one extra line.

Attached the patch.

Similar issue exists in tests/classes/factory_and_singleton_010.phpt

Actually after ===DONE=== newline preceded in warning message brings the
cursor to next immedeate line with a warning message. So expecting one
more new line between ===DONE=== and warning message is incorrect.

Correct me if I am wrong.

If I am correct can I go ahead and commit it.

With regards
Kamesh Jayachandran

---

## #12951 — Marcus Boerger — 2004-09-23T19:07:01+00:00

URL: https://externals.io/message/12946#12951 · In reply to: #12946

Hello Kamesh,

 doesn't work for me. And if you were right we would see those tests FAILing
in all php 5 test reports. There must be another problem.

regards
marcus

Thursday, September 23, 2004, 1:15:30 PM, you wrote:

> Hi Helly,
> I had the tests/classes/factory_and_singleton_009.phpt testcase failing
> in Linux, NetWare, Windows ports of PHP.
> And found that this failure is due to one extra line.

> Attached the patch.

> Similar issue exists in tests/classes/factory_and_singleton_010.phpt

> Actually after ===DONE=== newline preceded in warning message brings the
> cursor to next immedeate line with a warning message. So expecting one
> more new line between ===DONE=== and warning message is incorrect.

> Correct me if I am wrong.

> If I am correct can I go ahead and commit it.

> With regards
> Kamesh Jayachandran 



-- 
Best regards,
 Marcus                            mailto:helly@php.net

---

## #12960 — Kamesh Jayachandran — 2004-09-24T07:20:15+00:00

URL: https://externals.io/message/12946#12960 · In reply to: #12951

Hi Marcus,

For me also this test is going through if I run the test using
run-tests.php.

But it fails with run-tests2.php

With run-tests2.php
I could see the output from the execute function itself was lacking that
one new line character that exists between
===DONE=== and the actual waring line.

The only difference I could see is the way the php
factory_and_singleton_009.php

In run-tests.php
All the -d option value pairs are enclosed by double quote
has extra options -d "xdebug.default_enable=0" -d "session.auto_start=0"
runs the script with -f option.

With regards
Kamesh Jayachandran
On Thu, 23 Sep 2004 21:07:01 +0200, "Marcus Boerger" <helly@php.net>
said:
> Hello Kamesh,
> 
>  doesn't work for me. And if you were right we would see those tests
>  FAILing
> in all php 5 test reports. There must be another problem.
> 
> regards
> marcus
> 
> Thursday, September 23, 2004, 1:15:30 PM, you wrote:
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> > […]
> 
> 
> 
> -- 
> Best regards,
>  Marcus                            mailto:helly@php.net

---

## #12961 — Kamesh Jayachandran — 2004-09-24T08:36:19+00:00

URL: https://externals.io/message/12946#12961 · In reply to: #12960

Hi Marcus,

Found the cause of the problem.

getSectionText function in run-tests2.php is trimming the each
sectiontext values except for POST.

This trimming causes the eol character in the phpt file to get lost when
saved to a php file.

Should we have to remove the trim function? or fix our testcases or
run-tests.php?

Please advise.

With regards
Kamesh Jayachandran

On Fri, 24 Sep 2004 00:20:15 -0700, "Kamesh Jayachandran"
<kameshj@fastmail.fm> said:
> Hi Marcus,
> 
> For me also this test is going through if I run the test using
> run-tests.php.
> 
> But it fails with run-tests2.php
> 
> With run-tests2.php
> I could see the output from the execute function itself was lacking that
> one new line character that exists between
> ===DONE=== and the actual waring line.
> 
> The only difference I could see is the way the php
> factory_and_singleton_009.php
> 
> In run-tests.php
> All the -d option value pairs are enclosed by double quote
> has extra options -d "xdebug.default_enable=0" -d "session.auto_start=0"
> runs the script with -f option.
> 
> With regards
> Kamesh Jayachandran
> On Thu, 23 Sep 2004 21:07:01 +0200, "Marcus Boerger" <helly@php.net>
> said:
> > […]

---

## #12964 — Derick Rethans — 2004-09-24T12:20:01+00:00

URL: https://externals.io/message/12946#12964 · In reply to: #12961

> Hi Marcus,
>
> Found the cause of the problem.
>
> getSectionText function in run-tests2.php is trimming the each
> sectiontext values except for POST.

Don't use run-tests2.php, it's not working and not supported.

Derick
