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