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

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

[nongnu] elpa/nix-mode 1b8b6f5eac 339/500: Add failing test that checks


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 1b8b6f5eac 339/500: Add failing test that checks indentation of let expressions.
Date: Sat, 29 Jan 2022 08:27:19 -0500 (EST)

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

    Add failing test that checks indentation of let expressions.
---
 tests/nix-mode-tests.el      |  4 ++++
 tests/testcases/smie-let.nix | 45 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 2a58e0d67c..f3e4a77b98 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -197,5 +197,9 @@ Related issue: https://github.com/NixOS/nix-mode/issues/72";
   "Proper indentation of closing parentheses."
   (with-nix-mode-test ("smie-close-parens.nix" :indent 'smie-indent-line)))
 
+(ert-deftest nix-mode-test-let-smie ()
+  "Proper indentation of let expressions."
+  (with-nix-mode-test ("smie-let.nix" :indent 'smie-indent-line)))
+
 (provide 'nix-mode-tests)
 ;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/smie-let.nix b/tests/testcases/smie-let.nix
new file mode 100644
index 0000000000..ab21db86b4
--- /dev/null
+++ b/tests/testcases/smie-let.nix
@@ -0,0 +1,45 @@
+let
+  foo = 42;
+  bar = let foo = 42; in
+        let bar = 42; in
+        42;
+  baz = 42;
+in
+let foo = 42; in
+let foo = 42;
+    bar = 42;
+in
+let foo = let
+      bar = 42;
+    in
+      42;
+    bar = 42;
+in
+let
+  foo = let
+    bar = 42;
+  in
+    42;
+  bar = 42;
+in
+let foo = 42;
+in
+{
+  foo = let
+    bar = 42;
+  in
+    42;
+
+  foo = let bar = 42;
+        in 42;
+
+  foo = let bar = 42; in
+        42;
+
+  foo =
+    let
+      foo = 42;
+      bar = 42;
+    in
+      42;
+}



reply via email to

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