Annotation of embedaddon/php/ext/ftp/tests/bug39458-2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #39458 (ftp_nlist() returns false on empty directories (other server behaviour))
3: --SKIPIF--
4: <?php
5: require 'skipif.inc';
6: ?>
7: --FILE--
8: <?php
9: $bug39458=1;
10: require 'server.inc';
11:
12: $ftp = ftp_connect('127.0.0.1', $port);
13: if (!$ftp) die("Couldn't connect to the server");
14:
15: var_dump(ftp_login($ftp, 'user', 'pass'));
16:
17: var_dump(ftp_nlist($ftp, ''));
18: var_dump(ftp_nlist($ftp, 'emptydir'));
19: var_dump(ftp_nlist($ftp, 'bogusdir'));
20:
21: ftp_close($ftp);
22: ?>
23: --EXPECT--
24: bool(true)
25: array(3) {
26: [0]=>
27: string(5) "file1"
28: [1]=>
29: string(5) "file1"
30: [2]=>
31: string(9) "file
32: b0rk"
33: }
34: array(0) {
35: }
36: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>