about summary refs log tree commit diff
path: root/tests/lang/eval-okay-tojson.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/eval-okay-tojson.nix')
-rw-r--r--tests/lang/eval-okay-tojson.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-tojson.nix b/tests/lang/eval-okay-tojson.nix
new file mode 100644
index 000000000000..0d4e55b3d367
--- /dev/null
+++ b/tests/lang/eval-okay-tojson.nix
@@ -0,0 +1,11 @@
+builtins.toJSON
+  { a = 123;
+    b = -456;
+    c = "foo";
+    d = "foo\n\"bar\"";
+    e = true;
+    f = false;
+    g = [ 1 2 3 ];
+    h = [ "a" [ "b" { "foo\nbar" = {}; } ] ];
+    i = 1 + 2;
+  }