lix/tests/functional/lang/eval-okay-pathexists.nix
2023-10-20 13:06:44 +02:00

32 lines
1.8 KiB
Nix

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 (builtins.toPath { __toString = x: builtins.toString ./lib.nix; })
&& builtins.pathExists (builtins.toPath { outPath = builtins.toString ./lib.nix; })
&& builtins.pathExists ./lib.nix
&& !builtins.pathExists ./bla.nix