When I run run-tests.sh as follows

scripts/run-tests.sh --url http://d6test10.localhost:8888 --list

I get a "Notice: Undefined index: path in ..." error and output buffering whining.
Reason: url_parse('http://d6test10.localhost:8888') does not contain a 'path' entry, because there is no trailing '/' in the url.

Using 'http://d6test10.localhost:8888/' (with a trailing '/') does work however.

in attachment a tiny little patch that makes it possible to forget the trailing '/'

CommentFileSizeAuthor
url_without_path.patch772 bytessoxofaan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Project: SimpleTest » Drupal core
Version: 6.x-2.x-dev » 7.x-dev
Component: User interface » simpletest.module
Category: task » bug
Status: Needs review » Needs work

I would rather throw an error in that case. Anyway, this has to be fixed in D7, then backported.

soxofaan’s picture

I would rather throw an error

What's wrong with "http://example.com"? According to the URL RFC (admittedly, I only took a quick glance), it is a valid url.

Damien Tournoud’s picture

That would be consistent with, for example, what "ab" does. The RFCs are not very trust-worthy, because URLs are strange beast: even the schema part is optional (ie. //example.com/path *is* a valid URL).

lefnire’s picture

Mayhap, if they forget the trailing slash -- add it in (ala patch) & give them a warning? I forsee a common situation:
1) $ php script/run-tests.sh --all --url http://localhost
2) Error. Disgruntled dev hits [up-arrow] / [enter]
3) Process becomes muscle-memory