emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/nix-mode 0bab799a87 325/500: Add failing test that checks


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 0bab799a87 325/500: Add failing test that checks indentation of closing parens.
Date: Sat, 29 Jan 2022 08:27:18 -0500 (EST)

branch: elpa/nix-mode
commit 0bab799a879b22fe2c6c8110a38b331d3b526719
Author: Jakub Piecuch <j.piecuch96@gmail.com>
Commit: Jakub Piecuch <j.piecuch96@gmail.com>

    Add failing test that checks indentation of closing parens.
---
 tests/nix-mode-tests.el               |  4 +++
 tests/testcases/smie-close-parens.nix | 50 +++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index a6b3eb68c1..2855357cb0 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -192,5 +192,9 @@ Related issue: https://github.com/NixOS/nix-mode/issues/72";
   "Proper indentation of function bodies."
   (with-nix-mode-test ("smie-lambdas.nix" :indent 'smie-indent-line)))
 
+(ert-deftest nix-mode-test-close-parens-smie ()
+  "Proper indentation of closing parentheses."
+  (with-nix-mode-test ("smie-close-parens.nix" :indent 'smie-indent-line)))
+
 (provide 'nix-mode-tests)
 ;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/smie-close-parens.nix 
b/tests/testcases/smie-close-parens.nix
new file mode 100644
index 0000000000..29dc4ef924
--- /dev/null
+++ b/tests/testcases/smie-close-parens.nix
@@ -0,0 +1,50 @@
+{
+  test1 =
+    { foo = {
+        bar = 42;
+      };
+    };
+
+  test2 =
+    {
+      foo = {
+        bar = 42;
+      };
+    };
+
+  test3 = {
+    foo = { bar = 42;
+            baz = 42;
+          };
+  };
+
+  test4 = [
+    {
+      foo = 42;
+    }
+  ];
+
+  test5 = [
+    { foo = 42;
+      bar = 42;
+    }
+  ];
+
+  test6 =
+    [ { foo = 42;
+        bar = 42;
+      }
+    ];
+
+  test7 =
+    [
+      {
+        foo = 42;
+        bar = 42;
+      }
+    ];
+
+  test8 = (foo:
+    42
+  );
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]