tests/functional2/lang: migrated first tests
Change-Id: I4b5755a63d9454db20f63f751f5f33564a2ee5be
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
from functional2.testlib.fixtures.nix import Nix
|
||||
|
||||
|
||||
def test_err_context(nix: Nix):
|
||||
# the lang test framework doesn't check this folder, as there is a custom test in here
|
||||
# it won't scream about missing an `in.nix` or .exp files
|
||||
result = nix.nix_instantiate(
|
||||
["--show-trace", "--eval", "-E", 'builtins.addErrorContext "Hello" (throw "Foo")']
|
||||
).run()
|
||||
assert "Hello" in result.expect(1).stderr_s
|
||||
Reference in New Issue
Block a user