Commit 8a3dbe81 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

tests.trivial-builders.writeShellApplication.entries.test-meta: avoid...

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.
parent 86539fa7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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 {