When running the test Database › Query logging on Windows, I get the two failed tests:

Correct function in query log.   Other   database_test.test   1718   DatabaseLoggingTestCase->testEnableLogging()	
Correct function in query log.   Other   database_test.test   1718   DatabaseLoggingTestCase->testEnableLogging()	

This is because the filenames returned by debug_backtrace() contain backslashes, e.g.
D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\includes\database\log.inc.

The attached patch fixes the problem. I chose this solution because of its readability.

CommentFileSizeAuthor
#2 findCaller-2.patch1.23 KBc960657
findCaller.patch1.14 KBc960657
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Crell’s picture

Status: Needs review » Needs work

Well bah. Wouldn't it be better to use DIRECTORY_SEPARATOR instead, though, to be properly cross-platform?

c960657’s picture

FileSize
1.23 KB

Yes, that is better.

Crell’s picture

Status: Needs work » Needs review

Code looks good visually. I've not tested it yet, but it's simple enough that it hardly needs extensive testing.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and tests still run properly under Linux. I have no Windows box to test on, but I see no way in which it would fail there with this patch. Thanks, c!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.