tests/functional2: Migrate symlink-resolution
the newly added f1/lang tests is required for the f1/lang framework dismanteling to happen in a separate commit Change-Id: Ic419c515262294c51a46d1513daa7848e4b71405
This commit is contained in:
@@ -0,0 +1 @@
|
||||
""
|
||||
@@ -0,0 +1 @@
|
||||
""
|
||||
@@ -1 +0,0 @@
|
||||
"test"
|
||||
@@ -1 +0,0 @@
|
||||
import symlink-resolution/foo/overlays/overlay.nix
|
||||
@@ -0,0 +1 @@
|
||||
"test"
|
||||
@@ -0,0 +1,22 @@
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
|
||||
from functional2.testlib.fixtures.file_helper import with_files, File, AssetSymlink, Symlink
|
||||
from functional2.testlib.fixtures.nix import Nix
|
||||
from functional2.testlib.fixtures.snapshot import Snapshot
|
||||
|
||||
|
||||
@with_files(
|
||||
{
|
||||
"in.nix": File("import symlink-resolution/foo/overlays/overlay.nix"),
|
||||
"out.exp": AssetSymlink("assets/symlink-resolution.out.exp"),
|
||||
"symlink-resolution": {
|
||||
"foo": {"lib": {"default.nix": File('"test"')}, "overlays": Symlink("../overlays")},
|
||||
"overlays": {"overlay.nix": File("import ../lib")},
|
||||
},
|
||||
}
|
||||
)
|
||||
def test_symlink_resolution(nix: Nix, files: Path, snapshot: Callable[[str], Snapshot]):
|
||||
res = nix.nix_instantiate(["--eval", "--strict", files / "in.nix"]).run().ok()
|
||||
assert snapshot("out.exp") == res.stdout_plain
|
||||
assert not res.stderr_plain
|
||||
Reference in New Issue
Block a user