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.
This commit is contained in:
Yueh-Shun Li
2025-11-11 03:42:14 +08:00
parent 86539fa719
commit 8a3dbe81d5
@@ -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 {