summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-11-10 08:35:39 +0100
committerRemi Collet <remi@php.net>2023-11-10 08:35:39 +0100
commit0a9b035bee3515e9e395e0df9b624503781068e6 (patch)
tree83a2549f3a27b7418802fdcbda3b7feda3dd7d90 /tests
parentba8ff7f35e870a10bb0bd68b3ba0ec9ab43b8576 (diff)
new function: rpmgetsymlink(string $path, string $name): ?string
Diffstat (limited to 'tests')
-rw-r--r--tests/014-stream.phpt9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/014-stream.phpt b/tests/014-stream.phpt
index 95f815e..69b881e 100644
--- a/tests/014-stream.phpt
+++ b/tests/014-stream.phpt
@@ -43,6 +43,11 @@ var_dump(trim(file_get_contents($n))); // Existing file
var_dump(trim(file_get_contents($foo))); // Hardlink with content
var_dump(trim(file_get_contents($bar))); // hardlink without content
var_dump(file_get_contents($x)); // Missing file
+
+echo "+ symlink\n";
+var_dump(rpmgetsymlink(__DIR__ . "/bidon.rpm", "missing"));
+var_dump(rpmgetsymlink(__DIR__ . "/bidon.rpm", "/etc/foo.conf")); // not a symlink
+var_dump(rpmgetsymlink(__DIR__ . "/bidon.rpm", "/etc/toto.conf")); // symlink
?>
Done
--EXPECTF--
@@ -85,4 +90,8 @@ string(7) "content"
Warning: file_get_contents(%s/bidon.rpm#/usr/share/doc/bidon/MISSING): Failed to open stream: operation failed in %s on line %d
bool(false)
++ symlink
+NULL
+string(0) ""
+string(8) "foo.conf"
Done