]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 10 Jul 2020 08:10:30 +0000 (10:10 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 10 Jul 2020 08:10:30 +0000 (10:10 +0200)
* PHP-7.4:
  Enable symlink_link_linkinfo_is_link_* tests on Windows

13 files changed:
1  2 
ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt

index cde6783e15f18a1ff6d109d98996a630731defd8,2c3017628c21b5e03a7ee2b178e34628fc470c02..69715be008ee0b9579edd58592e67bd245ee5715
@@@ -1,13 -1,20 +1,7 @@@
  --TEST--
  Test symlink(), linkinfo(), link() and is_link() functions : usage variations - hardlink to non-existent file
- --SKIPIF--
- <?php
- if (substr(PHP_OS, 0, 3) == 'WIN') {
-     die('skip no symlinks on Windows');
- }
- ?>
  --FILE--
  <?php
 -/* Prototype: bool symlink ( string $target, string $link );
 -   Description: creates a symbolic link to the existing target with the specified name link
 -
 -   Prototype: bool is_link ( string $filename );
 -   Description: Tells whether the given file is a symbolic link.
 -
 -   Prototype: bool link ( string $target, string $link );
 -   Description: Create a hard link
 -
 -   Prototype: int linkinfo ( string $path );
 -   Description: Gets information about a link
 -*/
 -
  /* Variation 2 : Create hard link to non-existent file */
  
  $file_path = __DIR__;
index 1bb3b76eaa5fb1c9899ea60920a9300f1e5c5cb5,fa39a9bf6d84c9912bc3d71cbe7637a097f5c986..ff2a3f0f4a66bb6f9ca17672eff6b1939f114c1c
@@@ -1,13 -1,20 +1,7 @@@
  --TEST--
  Test symlink(), linkinfo(), link() and is_link() functions : usage variations - access/update file through hard link
- --SKIPIF--
- <?php
- if (substr(PHP_OS, 0, 3) == 'WIN') {
-     die('skip no symlinks on Windows');
- }
- ?>
  --FILE--
  <?php
 -/* Prototype: bool symlink ( string $target, string $link );
 -   Description: creates a symbolic link to the existing target with the specified name link
 -
 -   Prototype: bool is_link ( string $filename );
 -   Description: Tells whether the given file is a symbolic link.
 -
 -   Prototype: bool link ( string $target, string $link );
 -   Description: Create a hard link
 -
 -   Prototype: int linkinfo ( string $path );
 -   Description: Gets information about a link
 -*/
 -
  /* Variation 4 : Create file and a hard link to the file
                   Access data of the file through the hard link
                   Update the file through hard link
index 0fd0b4838ea836abf0fa9175c192ae856f967065,c5e1c4805f435a28f2af5ad37ba4a4cbe27ef7f6..baf8a402cd14f4dd143c29812f2fb8ff171d14b4
@@@ -69,10 -83,14 +70,14 @@@ var_dump(is_int($linkinfo) && $linkinf
  if( $s1[0] == $linkinfo )
    echo "\nlinkinfo() value matches lstat['dev']\n";
  else
 -  echo "\nWarning: linkinfo() value doesnt match lstat['dev']\n";
 +  echo "\nWarning: linkinfo() value doesn't match lstat['dev']\n";
  
  // delete link
- unlink($soft_link);
+ if (PHP_OS_FAMILY === 'Windows') {
+   rmdir($soft_link);
+ } else {
+   unlink($soft_link);
+ }
  
  echo "Done\n";
  ?>