tests/functional2/lang: Migrate builtins.readFileType
Change-Id: I7f6c4cddb8d969cb45652e1f72c0001a0ebd2d38
This commit is contained in:
@@ -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_file_type(files: Path, nix: Nix, snapshot: Callable[[str], Snapshot]):
|
||||
nix_eval(files, nix, [], snapshot)
|
||||
Reference in New Issue
Block a user