tests/functional2/lang: Migrate rec-set-overrides tests

Change-Id: I2ffc949773188d9b98629df87ac0d2fbf7b2ee6f
This commit is contained in:
piegames
2025-11-17 22:10:11 +00:00
parent fdfe21954f
commit 7bb79d0ae6
14 changed files with 60 additions and 7 deletions
@@ -1 +0,0 @@
--extra-deprecated-features rec-set-overrides
@@ -1 +0,0 @@
--extra-deprecated-features rec-set-overrides
@@ -1 +0,0 @@
parse-okay-rec-set-override-warning.exp
@@ -1 +0,0 @@
--extra-deprecated-features rec-set-overrides
@@ -1 +0,0 @@
parse-okay-rec-set-override-warning.nix
@@ -1,11 +1,11 @@
warning: __overrides attributes are deprecated and will be removed in the future. Use --extra-deprecated-features rec-set-overrides to silence this warning.
at /pwd/parse-okay-rec-set-override-warning.nix:3:17:
at /pwd/in.nix:3:17:
2| # Should warn
3| { a = rec {}; a.__overrides = {}; }
| ^
4| rec { __overrides = {}; }
warning: __overrides attributes are deprecated and will be removed in the future. Use --extra-deprecated-features rec-set-overrides to silence this warning.
at /pwd/parse-okay-rec-set-override-warning.nix:4:9:
at /pwd/in.nix:4:9:
3| { a = rec {}; a.__overrides = {}; }
4| rec { __overrides = {}; }
| ^
@@ -0,0 +1,40 @@
_type: ExprList
elems:
- _type: ExprSet
attrs:
a:
_type: ExprSet
attrs:
__overrides:
_type: ExprSet
recursive: false
recursive: true
recursive: false
- _type: ExprSet
attrs:
__overrides:
_type: ExprSet
recursive: false
recursive: true
- _type: ExprSet
attrs:
__overrides:
_type: ExprSet
recursive: false
recursive: false
- _type: ExprSet
dynamicAttrs:
- name:
_type: ExprConcatStrings
es:
- _type: ExprLiteral
value: __overrides
valueType: String
- _type: ExprLiteral
value: ''
valueType: String
isInterpolation: false
value:
_type: ExprSet
recursive: false
recursive: true
@@ -0,0 +1,18 @@
[[test]]
runner = "parse-okay"
flags = [ "--extra-deprecated-features", "rec-set-overrides" ]
# Same as above but with deprecation warning
[[test]]
name = "parse-okay-deprecation-warning"
runner = "parse-okay"
[[test]]
runner = "eval-fail"
in = "in-2.nix"
flags = [ "--extra-deprecated-features", "rec-set-overrides" ]
[[test]]
runner = "eval-okay"
in = "in-3.nix"
flags = [ "--extra-deprecated-features", "rec-set-overrides" ]