From 1422b32dfc08e0bfae9f1d3bb244e40cbf2fb311 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 12 Dec 2024 12:14:06 +0100 Subject: [PATCH] lib/tests: Fix after treewide reformat The test checks against line numbers, which changed with 776b0b45a36ec8e9bcae8e8e93085dac5d8b5a3c. This is effectively a partial backport of 8f425c25adc365ccddab932cae96cdbed96c115b --- lib/tests/modules.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 750b1d025e026..ca0b42c8a27d7 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -497,21 +497,21 @@ checkConfigOutput '^"pear\\npear"$' config.twice.raw ./merge-module-with-key.nix # Declaration positions # Line should be present for direct options -checkConfigOutput '^10$' options.imported.line10.declarationPositions.0.line ./declaration-positions.nix +checkConfigOutput '^14$' options.imported.line10.declarationPositions.0.line ./declaration-positions.nix checkConfigOutput '/declaration-positions.nix"$' options.imported.line10.declarationPositions.0.file ./declaration-positions.nix # Generated options may not have line numbers but they will at least get the # right file checkConfigOutput '/declaration-positions.nix"$' options.generated.line18.declarationPositions.0.file ./declaration-positions.nix checkConfigOutput '^null$' options.generated.line18.declarationPositions.0.line ./declaration-positions.nix # Submodules don't break it -checkConfigOutput '^39$' config.submoduleLine34.submodDeclLine39.0.line ./declaration-positions.nix +checkConfigOutput '^45$' config.submoduleLine34.submodDeclLine39.0.line ./declaration-positions.nix checkConfigOutput '/declaration-positions.nix"$' config.submoduleLine34.submodDeclLine39.0.file ./declaration-positions.nix # New options under freeform submodules get collected into the parent submodule # (consistent with .declarations behaviour, but weird; notably appears in system.build) -checkConfigOutput '^34|23$' options.submoduleLine34.declarationPositions.0.line ./declaration-positions.nix -checkConfigOutput '^34|23$' options.submoduleLine34.declarationPositions.1.line ./declaration-positions.nix +checkConfigOutput '^38|27$' options.submoduleLine34.declarationPositions.0.line ./declaration-positions.nix +checkConfigOutput '^38|27$' options.submoduleLine34.declarationPositions.1.line ./declaration-positions.nix # nested options work -checkConfigOutput '^30$' options.nested.nestedLine30.declarationPositions.0.line ./declaration-positions.nix +checkConfigOutput '^34$' options.nested.nestedLine30.declarationPositions.0.line ./declaration-positions.nix cat <