aboutsummaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-10-02 14:08:25 +0200
committerGitHub <noreply@github.com>2023-10-02 14:08:25 +0200
commit7e2399b12360d267af8dac033c3d0d95a00b874d (patch)
tree9f12b71e4b6d19029d52b24fe51a8d709c55bb64 /tests/lang
parent9e212344f948e3f362807581bfe3e3d535372618 (diff)
parent860f64c345ac170763d39310dedcc624bd8f70a4 (diff)
Merge pull request #9079 from hercules-ci/backport-9022-to-2.18-maintenance
[Backport 2.18-maintenance] pathExists: isDir when endswith /.
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-pathexists.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-pathexists.nix b/tests/lang/eval-okay-pathexists.nix
index e1246e370..c5e7a62de 100644
--- a/tests/lang/eval-okay-pathexists.nix
+++ b/tests/lang/eval-okay-pathexists.nix
@@ -2,6 +2,27 @@ builtins.pathExists (./lib.nix)
&& builtins.pathExists (builtins.toPath ./lib.nix)
&& builtins.pathExists (builtins.toString ./lib.nix)
&& !builtins.pathExists (builtins.toString ./lib.nix + "/")
+&& !builtins.pathExists (builtins.toString ./lib.nix + "/.")
+# FIXME
+# && !builtins.pathExists (builtins.toString ./lib.nix + "/..")
+# && !builtins.pathExists (builtins.toString ./lib.nix + "/a/..")
+# && !builtins.pathExists (builtins.toString ./lib.nix + "/../lib.nix")
+&& !builtins.pathExists (builtins.toString ./lib.nix + "/./")
+&& !builtins.pathExists (builtins.toString ./lib.nix + "/./.")
+&& builtins.pathExists (builtins.toString ./.. + "/lang/lib.nix")
+&& !builtins.pathExists (builtins.toString ./.. + "lang/lib.nix")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/lib.nix")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/./lib.nix")
+&& builtins.pathExists (builtins.toString ./.)
+&& builtins.pathExists (builtins.toString ./. + "/")
+&& builtins.pathExists (builtins.toString ./. + "/../lang")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/.")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/./")
+&& builtins.pathExists (builtins.toString ./. + "/../lang//./")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/..")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/../")
+&& builtins.pathExists (builtins.toString ./. + "/../lang/..//")
&& builtins.pathExists (builtins.toPath (builtins.toString ./lib.nix))
&& !builtins.pathExists (builtins.toPath (builtins.toString ./bla.nix))
&& builtins.pathExists ./lib.nix