1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
nix/tests/functional/lang/eval-fail-fromTOML-overflow.err.exp
Emily acd627fa46
tests/functional/lang: Add tests for builtins.fromTOML overflow
This adds regression tests for fromTOML overflow/underflow behavior.
Previous versions of toml11 used to saturate, but this was never an
intended behavior (and Snix/Nix 2.3/toml11 >= 4.0 validate this).

(cherry picked from Lix [1,2])

[1]: 7ee442079d
[2]: 4de09b6b54
2025-09-01 01:49:15 +03:00

13 lines
460 B
Text

error:
… while calling the 'fromTOML' builtin
at /pwd/lang/eval-fail-fromTOML-overflow.nix:1:1:
1| builtins.fromTOML ''attr = 9223372036854775808''
| ^
2|
error: while parsing TOML: [error] toml::parse_dec_integer: too large integer: current max digits = 2^63
--> fromTOML
|
1 | attr = 9223372036854775808
| ^-- must be < 2^63