From 449ddbe32402cd866de2e9011c50ee80cc7fc2b7 Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 30 Aug 2025 16:41:40 +0200 Subject: [PATCH] tests/functional2/lang: Migrate builtins.toJSON Change-Id: Ic740ab1fe0792c7e7596ae8a9beb9e76b37d6284 --- .../lang/builtins.toJSON/eval-fail-lambda.err.exp} | 6 +++--- .../lang/builtins.toJSON/eval-fail-throw.err.exp} | 14 +++++++------- .../lang/builtins.toJSON/eval-okay.out.exp} | 0 .../lang/builtins.toJSON/in-lambda.nix} | 0 .../lang/builtins.toJSON/in-throw.nix} | 0 .../lang/builtins.toJSON/in.nix} | 0 6 files changed, 10 insertions(+), 10 deletions(-) rename tests/{functional/lang/eval-fail-toJSON-nested.err.exp => functional2/lang/builtins.toJSON/eval-fail-lambda.err.exp} (73%) rename tests/{functional/lang/eval-fail-toJSON.err.exp => functional2/lang/builtins.toJSON/eval-fail-throw.err.exp} (77%) rename tests/{functional/lang/eval-okay-tojson.exp => functional2/lang/builtins.toJSON/eval-okay.out.exp} (100%) rename tests/{functional/lang/eval-fail-toJSON-nested.nix => functional2/lang/builtins.toJSON/in-lambda.nix} (100%) rename tests/{functional/lang/eval-fail-toJSON.nix => functional2/lang/builtins.toJSON/in-throw.nix} (100%) rename tests/{functional/lang/eval-okay-tojson.nix => functional2/lang/builtins.toJSON/in.nix} (100%) diff --git a/tests/functional/lang/eval-fail-toJSON-nested.err.exp b/tests/functional2/lang/builtins.toJSON/eval-fail-lambda.err.exp similarity index 73% rename from tests/functional/lang/eval-fail-toJSON-nested.err.exp rename to tests/functional2/lang/builtins.toJSON/eval-fail-lambda.err.exp index b261f1fbf..07a440d7a 100644 --- a/tests/functional/lang/eval-fail-toJSON-nested.err.exp +++ b/tests/functional2/lang/builtins.toJSON/eval-fail-lambda.err.exp @@ -1,18 +1,18 @@ error: … while calling the 'toJSON' builtin - at /pwd/eval-fail-toJSON-nested.nix:1:1: + at /pwd/in.nix:1:1: 1| builtins.toJSON { foo = a: 1; } | ^ 2| … while evaluating attribute 'foo' - at /pwd/eval-fail-toJSON-nested.nix:1:19: + at /pwd/in.nix:1:19: 1| builtins.toJSON { foo = a: 1; } | ^ 2| error: cannot convert a function to JSON - at /pwd/eval-fail-toJSON-nested.nix:1:19: + at /pwd/in.nix:1:19: 1| builtins.toJSON { foo = a: 1; } | ^ 2| diff --git a/tests/functional/lang/eval-fail-toJSON.err.exp b/tests/functional2/lang/builtins.toJSON/eval-fail-throw.err.exp similarity index 77% rename from tests/functional/lang/eval-fail-toJSON.err.exp rename to tests/functional2/lang/builtins.toJSON/eval-fail-throw.err.exp index bcb7bfa2d..c1cf0385d 100644 --- a/tests/functional/lang/eval-fail-toJSON.err.exp +++ b/tests/functional2/lang/builtins.toJSON/eval-fail-throw.err.exp @@ -1,47 +1,47 @@ error: … while calling the 'toJSON' builtin - at /pwd/eval-fail-toJSON.nix:1:1: + at /pwd/in.nix:1:1: 1| builtins.toJSON { | ^ 2| a.b = [ … while evaluating attribute 'a' - at /pwd/eval-fail-toJSON.nix:2:3: + at /pwd/in.nix:2:3: 1| builtins.toJSON { 2| a.b = [ | ^ 3| true … while evaluating attribute 'b' - at /pwd/eval-fail-toJSON.nix:2:3: + at /pwd/in.nix:2:3: 1| builtins.toJSON { 2| a.b = [ | ^ 3| true … while evaluating list element at index 3 - at /pwd/eval-fail-toJSON.nix:2:3: + at /pwd/in.nix:2:3: 1| builtins.toJSON { 2| a.b = [ | ^ 3| true … while evaluating attribute 'c' - at /pwd/eval-fail-toJSON.nix:7:7: + at /pwd/in.nix:7:7: 6| { 7| c.d = throw "hah no"; | ^ 8| } … while evaluating attribute 'd' - at /pwd/eval-fail-toJSON.nix:7:7: + at /pwd/in.nix:7:7: 6| { 7| c.d = throw "hah no"; | ^ 8| } … caused by explicit throw - at /pwd/eval-fail-toJSON.nix:7:13: + at /pwd/in.nix:7:13: 6| { 7| c.d = throw "hah no"; | ^ diff --git a/tests/functional/lang/eval-okay-tojson.exp b/tests/functional2/lang/builtins.toJSON/eval-okay.out.exp similarity index 100% rename from tests/functional/lang/eval-okay-tojson.exp rename to tests/functional2/lang/builtins.toJSON/eval-okay.out.exp diff --git a/tests/functional/lang/eval-fail-toJSON-nested.nix b/tests/functional2/lang/builtins.toJSON/in-lambda.nix similarity index 100% rename from tests/functional/lang/eval-fail-toJSON-nested.nix rename to tests/functional2/lang/builtins.toJSON/in-lambda.nix diff --git a/tests/functional/lang/eval-fail-toJSON.nix b/tests/functional2/lang/builtins.toJSON/in-throw.nix similarity index 100% rename from tests/functional/lang/eval-fail-toJSON.nix rename to tests/functional2/lang/builtins.toJSON/in-throw.nix diff --git a/tests/functional/lang/eval-okay-tojson.nix b/tests/functional2/lang/builtins.toJSON/in.nix similarity index 100% rename from tests/functional/lang/eval-okay-tojson.nix rename to tests/functional2/lang/builtins.toJSON/in.nix