com php-src: Create posix_getpwnam_basic_01.phpt: ext/posix/tests/posix_getpwnam_basic_01.phpt

From: Date: Thu, 14 Feb 2019 19:36:53 +0000
Subject: com php-src: Create posix_getpwnam_basic_01.phpt: ext/posix/tests/posix_getpwnam_basic_01.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104645@lists.php.net to get a copy of this message
Commit: 2c90beacf0cca27dac84cae8b00a50d5f9e188f1 Author: Rodrigo Prado <royopa@gmail.com> Thu, 9 Nov 2017 20:20:09 -0200 Committer: Peter Kokot <peterkokot@gmail.com> Thu, 14 Feb 2019 20:36:53 +0100 Parents: 4411cb66567f72e373cc481654de61f732e08af0 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c90beacf0cca27dac84cae8b00a50d5f9e188f1 Log: Create posix_getpwnam_basic_01.phpt User Group: PHPSP #phptestfestbrasil Changed paths: A ext/posix/tests/posix_getpwnam_basic_01.phpt Diff: diff --git a/ext/posix/tests/posix_getpwnam_basic_01.phpt b/ext/posix/tests/posix_getpwnam_basic_01.phpt new file mode 100644 index 0000000..97bb159 --- /dev/null +++ b/ext/posix/tests/posix_getpwnam_basic_01.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test posix_getpwnam() function : basic functionality +--CREDITS-- +Rodrigo Prado de Jesus <royopa [at] gmail [dot] com> +User Group: PHPSP #phptestfestbrasil +--SKIPIF-- +<?php + if (!extension_loaded('posix')) die('skip - POSIX extension not loaded'); +?> +--FILE-- +<?php + $uid = posix_geteuid(); + $user = posix_getpwuid($uid); + print_r(posix_getpwnam($user['name'])); +?> +===DONE==== +--EXPECTREGEX-- +Array +\( + \[name\] => [^\r\n]+ + \[passwd\] => [^\r\n]+ + \[uid\] => [0-9]+ + \[gid\] => [0-9]+ + \[gecos\] => [^\r\n]* + \[dir\] => [^\r\n]+ + \[shell\] => [^\r\n]+ +\) +===DONE====

« previous php.cvs (#104645) next »