From 24bb01ea170a6705c6700be3fa7438b394523ea4 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 4 Feb 2025 00:39:34 +0100 Subject: [PATCH] tests: avoid unnecessary test script interpolation --- tests/asserts.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/asserts.nix b/tests/asserts.nix index c1fe177ee..1909f90b7 100644 --- a/tests/asserts.nix +++ b/tests/asserts.nix @@ -44,17 +44,16 @@ with lib; -- '' config.warnings; + "asserts/warnings.expected".text = concatStringsSep '' + + -- + '' config.test.asserts.warnings.expected; }; nmt.script = '' assertFileContent \ home-files/asserts/warnings.actual \ - ${ - pkgs.writeText "warnings.expected" (concatStringsSep '' - - -- - '' config.test.asserts.warnings.expected) - } + "$TESTED/home-files/asserts/warnings.expected" ''; }) @@ -64,17 +63,16 @@ with lib; -- '' (map (x: x.message) (filter (x: !x.assertion) config.assertions)); + "asserts/assertions.expected".text = concatStringsSep '' + + -- + '' config.test.asserts.assertions.expected; }; nmt.script = '' assertFileContent \ home-files/asserts/assertions.actual \ - ${ - pkgs.writeText "assertions.expected" (concatStringsSep '' - - -- - '' config.test.asserts.assertions.expected) - } + "$TESTED/home-files/asserts/assertions.expected" ''; }) ];