about summary refs log tree commit diff
path: root/pkgs/pkgs-lib/tests/formats.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-03-28 08:51:09 +0200
committerRobert Hensing <robert@roberthensing.nl>2022-04-01 15:19:45 +0200
commit4f8e44394cb5afdef302618d3b2a75ad4291c71f (patch)
treee56b6288a4868c5ca2f86d99d8dd583501d18517 /pkgs/pkgs-lib/tests/formats.nix
parent6febb906a84b3deb8311a7144a5598aff1b43691 (diff)
downloadnixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar.gz
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar.bz2
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar.lz
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar.xz
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.tar.zst
nixlib-4f8e44394cb5afdef302618d3b2a75ad4291c71f.zip
formats.javaProperties: init
Diffstat (limited to 'pkgs/pkgs-lib/tests/formats.nix')
-rw-r--r--pkgs/pkgs-lib/tests/formats.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/pkgs-lib/tests/formats.nix b/pkgs/pkgs-lib/tests/formats.nix
index 2bc4e407fe75..71b4a3946a34 100644
--- a/pkgs/pkgs-lib/tests/formats.nix
+++ b/pkgs/pkgs-lib/tests/formats.nix
@@ -168,4 +168,21 @@ in runBuildTests {
       level4 = "deep"
     '';
   };
+
+  # See also java-properties/default.nix for more complete tests
+  testJavaProperties = {
+    drv = evalFormat formats.javaProperties {} {
+      foo = "bar";
+      "1" = "2";
+      "ütf 8" = "dûh";
+      # NB: Some editors (vscode) show this _whole_ line in right-to-left order
+      "الجبر" = "أكثر من مجرد أرقام";
+    };
+    expected = ''
+      1 = 2
+      foo = bar
+      \u00fctf\ 8 = d\u00fbh
+      \u0627\u0644\u062c\u0628\u0631 = \u0623\u0643\u062b\u0631 \u0645\u0646 \u0645\u062c\u0631\u062f \u0623\u0631\u0642\u0627\u0645
+    '';
+  };
 }