diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-key.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-key.out.exp new file mode 100644 index 000000000..88878fa0a Binary files /dev/null and b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-key.out.exp differ diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-value.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-value.out.exp new file mode 100644 index 000000000..231f150c5 --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromJSON-value.out.exp @@ -0,0 +1 @@ +"a" diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-key.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-key.out.exp new file mode 100644 index 000000000..88878fa0a Binary files /dev/null and b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-key.out.exp differ diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-value.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-value.out.exp new file mode 100644 index 000000000..01cdaa278 --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/eval-allow-depr-fromTOML-value.out.exp @@ -0,0 +1 @@ +{ k = "a"; } diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-key.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-key.out.exp new file mode 100644 index 000000000..88878fa0a Binary files /dev/null and b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-key.out.exp differ diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-value.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-value.out.exp new file mode 100644 index 000000000..231f150c5 --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromJSON-value.out.exp @@ -0,0 +1 @@ +"a" diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-key.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-key.out.exp new file mode 100644 index 000000000..88878fa0a Binary files /dev/null and b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-key.out.exp differ diff --git a/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-value.out.exp b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-value.out.exp new file mode 100644 index 000000000..01cdaa278 --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/eval-depr-fromTOML-value.out.exp @@ -0,0 +1 @@ +{ k = "a"; } diff --git a/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-key.nix b/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-key.nix new file mode 100644 index 000000000..ffaa6a97d --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-key.nix @@ -0,0 +1 @@ +builtins.fromJSON ''{"a\u0000b": 1}'' diff --git a/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-value.nix b/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-value.nix new file mode 100644 index 000000000..c71ab990d --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/in-fromJSON-value.nix @@ -0,0 +1 @@ +builtins.fromJSON ''"a\u0000b"'' diff --git a/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-key.nix b/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-key.nix new file mode 100644 index 000000000..b622dc4dc --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-key.nix @@ -0,0 +1 @@ +builtins.fromTOML ''"a\u0000b" = 1'' diff --git a/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-value.nix b/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-value.nix new file mode 100644 index 000000000..183cab6b3 --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/in-fromTOML-value.nix @@ -0,0 +1 @@ +builtins.fromTOML ''k = "a\u0000b"'' diff --git a/tests/functional2/lang/nul_bytes_parsers/test.toml b/tests/functional2/lang/nul_bytes_parsers/test.toml new file mode 100644 index 000000000..14dabfd4e --- /dev/null +++ b/tests/functional2/lang/nul_bytes_parsers/test.toml @@ -0,0 +1,11 @@ +[[test]] +name = "eval-depr" +matrix = true +# FIXME: These should fail. +runner = "eval-okay" + +[[test]] +name = "eval-allow-depr" +matrix = true +runner = "eval-okay" +flags = ["--extra-deprecated-features", "nul-bytes"]