While the err file should always be empty, we prefer not have (easily avoidable) warnings in the log, in order for actual warnings to be spotted more easily. Additionally this way no additional changes are required in case they make use of some depreacted features in the future. Change-Id: Ie078e2a851b2035d839f6b95d4188e475eb96b2d
31 lines
815 B
Python
31 lines
815 B
Python
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"),
|
|
"err.exp": AssetSymlink("eval-okay.err.exp"),
|
|
}
|
|
)
|
|
def test_read_dir(files: Path, nix: Nix, snapshot: Callable[[str], Snapshot]):
|
|
nix_eval(files, nix, [], snapshot)
|