branch: elpa/nix-mode
commit 1ade7b76bdf0c07a673e27597e6227a6194a7f5a
Author: Elis Hirwing <[email protected]>
Commit: Elis Hirwing <[email protected]>
ert/indent: Add testcase for contents of lists
---
tests/nix-mode-tests.el | 5 +++++
tests/testcases/list-contents.nix | 14 ++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 4ed5208c29..99ead019d5 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -70,5 +70,10 @@ function to do the indentation tests."
;; Run additional tests
,@body)))
+(ert-deftest nix-mode-indent-test-list-contents ()
+ "Proper indentation for items inside of a list."
+ (with-nix-mode-test ("list-contents.nix" :indent t)))
+
+
(provide 'nix-mode-tests)
;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/list-contents.nix
b/tests/testcases/list-contents.nix
new file mode 100644
index 0000000000..4c6630eb32
--- /dev/null
+++ b/tests/testcases/list-contents.nix
@@ -0,0 +1,14 @@
+[
+ 1
+ false
+ true
+ https://nixos.org/
+ {
+ attr = "set";
+ }
+ [
+ "nested"
+ "list"
+ ]
+ "string"
+]