From 8a3dbe81d5cf9218505fdc538163583ec6a668be Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Tue, 11 Nov 2025 03:42:14 +0800 Subject: [PATCH] tests.trivial-builders.writeShellApplication.entries.test-meta: avoid duplicated and hard-coded value assertion The meta.description assertion has been broken at least twice during tree-wide meta.description linting. Let's address the root cause by comparing the meta attributes with the specified arguments. --- .../trivial-builders/test/writeShellApplication.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/trivial-builders/test/writeShellApplication.nix b/pkgs/build-support/trivial-builders/test/writeShellApplication.nix index 1325d18366fc..0c15853f91c3 100644 --- a/pkgs/build-support/trivial-builders/test/writeShellApplication.nix +++ b/pkgs/build-support/trivial-builders/test/writeShellApplication.nix @@ -35,14 +35,15 @@ in linkFarm "writeShellApplication-tests" { test-meta = let - script = writeShellApplication { + args = { name = "test-meta"; text = ""; meta.description = "Test for the `writeShellApplication` `meta` argument"; }; + script = writeShellApplication args; in - assert script.meta.mainProgram == "test-meta"; - assert script.meta.description == "A test for the `writeShellApplication` `meta` argument"; + assert script.meta.mainProgram == args.name; + assert script.meta.description == args.meta.description; script; test-runtime-inputs = checkShellApplication {