diff --git a/tests/functional/lang/readDir/foo/git-hates-directories b/tests/functional/lang/readDir/foo/git-hates-directories deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/functional/lang/readDir/ldir b/tests/functional/lang/readDir/ldir deleted file mode 120000 index 191028156..000000000 --- a/tests/functional/lang/readDir/ldir +++ /dev/null @@ -1 +0,0 @@ -foo \ No newline at end of file diff --git a/tests/functional/lang/readDir/linked b/tests/functional/lang/readDir/linked deleted file mode 120000 index c503f86a0..000000000 --- a/tests/functional/lang/readDir/linked +++ /dev/null @@ -1 +0,0 @@ -foo/git-hates-directories \ No newline at end of file diff --git a/tests/functional/lang/readDir/bar b/tests/functional2/lang/builtins.readDir/__init__.py similarity index 100% rename from tests/functional/lang/readDir/bar rename to tests/functional2/lang/builtins.readDir/__init__.py diff --git a/tests/functional/lang/eval-okay-readDir.exp b/tests/functional2/lang/builtins.readDir/eval-okay.out.exp similarity index 100% rename from tests/functional/lang/eval-okay-readDir.exp rename to tests/functional2/lang/builtins.readDir/eval-okay.out.exp diff --git a/tests/functional/lang/eval-okay-readDir.nix b/tests/functional2/lang/builtins.readDir/in.nix similarity index 100% rename from tests/functional/lang/eval-okay-readDir.nix rename to tests/functional2/lang/builtins.readDir/in.nix diff --git a/tests/functional2/lang/builtins.readDir/test_read_dir.py b/tests/functional2/lang/builtins.readDir/test_read_dir.py new file mode 100644 index 000000000..4e0f50ee9 --- /dev/null +++ b/tests/functional2/lang/builtins.readDir/test_read_dir.py @@ -0,0 +1,29 @@ +from collections.abc import Callable +from pathlib import Path + +from functional2.lang.test_lang import test_eval as nix_eval +from functional2.testlib.fixtures.file_helper import ( + with_files, + CopyFile, + Symlink, + AssetSymlink, + File, +) +from functional2.testlib.fixtures.nix import Nix +from functional2.testlib.fixtures.snapshot import Snapshot + + +@with_files( + { + "readDir": { + "foo": {}, + "ldir": Symlink("./foo"), + "bar": File(""), + "linked": Symlink("./bar"), + }, + "in.nix": CopyFile("in.nix"), + "out.exp": AssetSymlink("eval-okay.out.exp"), + } +) +def test_read_dir(files: Path, nix: Nix, snapshot: Callable[[str], Snapshot]): + nix_eval(files, nix, [], snapshot)