Re: testing of PEAR 1.7.0 / Space bug

From: Date: Sat, 24 Nov 2007 22:19:59 +0000
Subject: Re: testing of PEAR 1.7.0 / Space bug
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-4604@lists.php.net to get a copy of this message
Christian Weiske wrote: > Greg, > > >> Testing is easy > System/test.phpt as well as System::cat() are not safe for spaces in > the path. > > You split the files up with >> $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); > in System::cat(), which does definitely goes wrong if there is any > - even quoted - space in the path. if (!is_array($args)) { $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); } pass in an array, and no splitting is done. > In test.phpt, you pass files unquoted to System::cat(), which doubles > the problem. > Especially on Windows machines, where the temporary directory is in >> C:\Documents and Settings\My Name\Locale Settings\Temp\ > this just has to fail. > > Steps to reproduce on *nix: > $ mkdir /tmp/s\ p\ a\ c\ es > $ export TMPDIR=/tmp/s\ p\ a\ c\ es > $ pear run-tests System/test.phpt test is fixed to use an array instead of spaces. That test, btw, is probably the oldest test in the bunch - it predates my efforts to unit-test PEAR 1.4.0 Greg

« previous php.pear.qa (#4604) next »