aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/lang.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/test/lang.php b/test/lang.php
index f41c50955..33fc2e093 100644
--- a/test/lang.php
+++ b/test/lang.php
@@ -10,14 +10,14 @@ echo "Relocate `community` with `en` as a default: ", relocate($langs, 'communit
echo "\nTests:\n";
-$test_dir = '../sv/';
+$test_dir = '../sv/map/index.php';
$lstat = '';
if (file_exists($test_dir)) {
echo "The file $test_dir exists\n";
$lstat = lstat($test_dir);
// $linkinfo = linkinfo($test_dir);
- $readlink = readlink($test_dir . 'map');
+// $readlink = readlink($test_dir);
} else {
echo "The file $test_dir does not exist\n";
}
@@ -28,6 +28,12 @@ if (is_dir($test_dir)) {
echo "The $test_dir is not a dir.\n";
}
+if (is_file($test_dir)) {
+ echo "The $test_dir is a file\n";
+} else {
+ echo "The $test_dir is not a file.\n";
+}
+
if (is_readable($test_dir)) {
echo "The file $test_dir is readable\n";
} else {
@@ -35,17 +41,17 @@ if (is_readable($test_dir)) {
}
var_dump($lstat);
-var_dump($readlink);
+// var_dump($readlink);
-$test_dir = '../sl/';
+$test_dir = '../sl/map/index.php';
$lstat2 = '';
if (file_exists($test_dir)) {
echo "The file $test_dir exists\n";
$lstat2 = lstat($test_dir);
// $linkinfo = linkinfo($test_dir);
- $readlink = readlink($test_dir . 'map');
+// $readlink = readlink($test_dir);
} else {
echo "The file $test_dir does not exist\n";
}
@@ -56,6 +62,12 @@ if (is_dir($test_dir)) {
echo "The $test_dir is not a dir.\n";
}
+if (is_file($test_dir)) {
+ echo "The $test_dir is a file\n";
+} else {
+ echo "The $test_dir is not a file.\n";
+}
+
if (is_readable($test_dir)) {
echo "The file $test_dir is readable\n";
} else {
@@ -63,7 +75,7 @@ if (is_readable($test_dir)) {
}
var_dump($lstat2);
-var_dump($readlink);
+// var_dump($readlink);
$diff = array_diff($lstat, $lstat2);
var_dump($diff);