~ubuntu-branches/ubuntu/quantal/php5/quantal-proposed

« back to all changes in this revision

Viewing changes to ext/standard/tests/streams/bug60455_02.phpt

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-16 03:17:18 UTC
  • mfrom: (1.1.23) (0.3.41 sid)
  • Revision ID: package-import@ubuntu.com-20120216031718-v0cy98ben10nljri
Tags: 5.3.10-1ubuntu1
* Merge from Debian testing.  Remaining changes:
  - d/control: build-depend on mysql 5.5 instead of 5.1 for running tests.
  - d/setup-mysql.sh: modify to work with mysql 5.5 differences
  - debian/rules: export DEB_HOST_MULTIARCH properly.
  - Only build php5-sqlite for sqlite3, dropping the obsolete sqlite2.
  - Add build-dependency on lemon, which we now need.
  - Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
  - Dropped libcurl-dev not in the archive.
  - debian/control: replace build-depends on mysql-server with
    mysql-server-core-5.5 and mysql-client-5.5 to avoid upstart and
    mysql-server-5.5 postinst confusion with starting up multiple
    mysqlds listening on the same port.
  - Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions
    already in universe.
  - Suggest php5-suhosin rather than recommends.
  - Dropped libonig-dev and libqgdbm since its in universe. (libonig MIR
    has been declined due to an inactive upstream. So this is probably
    a permanent change).
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests
  - debian/control: Recommend php5-dev for php-pear.
* Dropped Changes:
  - d/patches/CVE-2011-4566.patch: Applied upstream
  - debian/rules: --enable-pcntl for cgi as well. (Applied in Debian)
* d/rules: enable Suhosin patch with PHP5_SUHOSIN=yes
* d/NEWS: add note explaining that SUHOSIN *is* enabled in the Ubuntu
  package.
* d/rules: Simplify apache config settings since we never build 
  interbase or firebird.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #60455: stream_get_line and 1-line followed by eol input
 
3
--FILE--
 
4
<?php
 
5
class TestStream {
 
6
        private $s = 0;
 
7
        function stream_open($path, $mode, $options, &$opened_path) {
 
8
                return true;
 
9
        }
 
10
        function stream_read($count) {
 
11
                if ($this->s++ == 0)
 
12
                        return "a\n";
 
13
                
 
14
                return "";
 
15
        }
 
16
        function stream_eof() {
 
17
                return $this->s >= 2;
 
18
        }
 
19
        
 
20
}
 
21
 
 
22
stream_wrapper_register("test", "TestStream");
 
23
 
 
24
$f = fopen("test://", "r");
 
25
while (!feof($f)) {
 
26
    $line = stream_get_line($f, 99, "\n");
 
27
    var_dump($line);
 
28
}
 
29
--EXPECT--
 
30
string(1) "a"