From 3e43f4aeff2947aea98bb0d538fa686bd55a1385 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 8 Mar 2024 09:51:10 +0100 Subject: [PATCH] add test for inherit expr printing (cherry picked from commit 73065a400d176b21f518c1f4ece90c31318b218d) Change-Id: I9356d8084d241a7904b66554d7c4194f8433edf7 --- tests/functional/lang/parse-okay-inherits.exp | 1 + tests/functional/lang/parse-okay-inherits.nix | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/functional/lang/parse-okay-inherits.exp create mode 100644 tests/functional/lang/parse-okay-inherits.nix diff --git a/tests/functional/lang/parse-okay-inherits.exp b/tests/functional/lang/parse-okay-inherits.exp new file mode 100644 index 000000000..050b54afd --- /dev/null +++ b/tests/functional/lang/parse-okay-inherits.exp @@ -0,0 +1 @@ +(let c = { }; b = 2; in { a = 1; inherit b ; d = (c).d; e = (c).e; f = 3; }) diff --git a/tests/functional/lang/parse-okay-inherits.nix b/tests/functional/lang/parse-okay-inherits.nix new file mode 100644 index 000000000..10596c8ad --- /dev/null +++ b/tests/functional/lang/parse-okay-inherits.nix @@ -0,0 +1,9 @@ +let + c = {}; + b = 2; +in { + a = 1; + inherit b; + inherit (c) d e; + f = 3; +}