tests/functional2/lang: Migrate string coersion for integers
Change-Id: I428c8935119b3184109b3e3f760ed72054b0cd00
This commit is contained in:
@@ -1 +0,0 @@
|
||||
--extra-experimental-features coerce-integers
|
||||
@@ -1 +0,0 @@
|
||||
"${42}" == 42
|
||||
@@ -1 +0,0 @@
|
||||
--extra-experimental-features coerce-integers
|
||||
@@ -1 +0,0 @@
|
||||
--extra-experimental-features coerce-integers
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
error:
|
||||
… while evaluating x
|
||||
at /pwd/eval-fail-accidental-coerce-integer-attempts.nix:1:21:
|
||||
at /pwd/in.nix:1:21:
|
||||
1| let x = "" + 42; in x == "42"
|
||||
| ^
|
||||
2|
|
||||
|
||||
… while evaluating a path segment
|
||||
at /pwd/eval-fail-accidental-coerce-integer-attempts.nix:1:14:
|
||||
at /pwd/in.nix:1:14:
|
||||
1| let x = "" + 42; in x == "42"
|
||||
| ^
|
||||
2|
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
error:
|
||||
… while calling the 'substring' builtin
|
||||
at /pwd/eval-fail-over-coercive-builtins-with-xp-feature.nix:1:1:
|
||||
at /pwd/in.nix:1:1:
|
||||
1| builtins.substring 0 1 42 == "4"
|
||||
| ^
|
||||
2|
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
error:
|
||||
… while evaluating a path segment
|
||||
at /pwd/eval-fail-coerce-integers-without-xp.nix:1:2:
|
||||
1| "${42}" == 42
|
||||
at /pwd/in.nix:1:2:
|
||||
1| "${42}" == "42"
|
||||
| ^
|
||||
2|
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[test]]
|
||||
runner = "eval-okay"
|
||||
flags = ["--extra-experimental-features", "coerce-integers"]
|
||||
in = "in.nix"
|
||||
|
||||
[[test]]
|
||||
runner = "eval-fail"
|
||||
flags = ["--extra-experimental-features", "coerce-integers"]
|
||||
matrix = true
|
||||
in = ["in-accidental-coerce.nix", "in-coerce-substring.nix"]
|
||||
|
||||
[[test]]
|
||||
name = "no-xp"
|
||||
runner = "eval-fail"
|
||||
in = "in.nix"
|
||||
Reference in New Issue
Block a user