[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for issues reported in #60 |
Date: |
Sat, 29 Jan 2022 08:27:14 -0500 (EST) |
branch: elpa/nix-mode
commit 02b59d9bcf24b77dea0d901c35a6958b4604f8df
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>
ert/indent: Add testcases for issues reported in #60
Related issue: https://github.com/NixOS/nix-mode/issues/60
---
tests/nix-mode-tests.el | 17 +++++++++++++++++
tests/testcases/issue-60.1.nix | 7 +++++++
tests/testcases/issue-60.2.nix | 8 ++++++++
tests/testcases/issue-60.3.nix | 8 ++++++++
4 files changed, 40 insertions(+)
diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 99ead019d5..7505908834 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -74,6 +74,23 @@ function to do the indentation tests."
"Proper indentation for items inside of a list."
(with-nix-mode-test ("list-contents.nix" :indent t)))
+(ert-deftest nix-mode-test-indent-issue-60-1 ()
+ "Proper indentation of attrsets inside of lists inside of attrsets.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/60"
+ (with-nix-mode-test ("issue-60.1.nix" :indent t)))
+
+(ert-deftest nix-mode-test-indent-issue-60-2 ()
+ "Proper indentation of code inside of let blocks.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/60"
+ (with-nix-mode-test ("issue-60.2.nix" :indent t)))
+
+(ert-deftest nix-mode-test-indent-issue-60-3 ()
+ "Proper indentation of import and newline after equal.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/60"
+ (with-nix-mode-test ("issue-60.3.nix" :indent t)))
(provide 'nix-mode-tests)
;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/issue-60.1.nix b/tests/testcases/issue-60.1.nix
new file mode 100644
index 0000000000..c575243447
--- /dev/null
+++ b/tests/testcases/issue-60.1.nix
@@ -0,0 +1,7 @@
+{
+ x86 = [
+ {
+ name = "t1.small.x86";
+ }
+ ];
+}
diff --git a/tests/testcases/issue-60.2.nix b/tests/testcases/issue-60.2.nix
new file mode 100644
index 0000000000..7a27cf793d
--- /dev/null
+++ b/tests/testcases/issue-60.2.nix
@@ -0,0 +1,8 @@
+let
+ x = [
+ (let y = 1; in y)
+ { foo = 1; }
+ [ 1 2 3 ]
+ x
+ ];
+in x
diff --git a/tests/testcases/issue-60.3.nix b/tests/testcases/issue-60.3.nix
new file mode 100644
index 0000000000..1cf7350a78
--- /dev/null
+++ b/tests/testcases/issue-60.3.nix
@@ -0,0 +1,8 @@
+let
+ mozilla-overlay =
+ import
+ (
+ builtins.fetchTarball
+ https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz
+ );
+in mozilla-overlay
- [nongnu] elpa/nix-mode 6532fcf244 244/500: Don’t expand nix-file in nix-shell., (continued)
- [nongnu] elpa/nix-mode 6532fcf244 244/500: Don’t expand nix-file in nix-shell., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 097b7bb992 257/500: Add nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a6571fa877 260/500: Add nix-log.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b62c395b65 264/500: Remove nix-shell-haskell.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1dd112e5cf 267/500: Fix function used as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f1973ceb4b 269/500: Add .nix to auto-mode-alist, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1ade7b76bd 282/500: ert/indent: Add testcase for contents of lists, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for issues reported in #60,
ELPA Syncer <=
- [nongnu] elpa/nix-mode bb602e160f 286/500: Cleanups, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7526a43ea0 292/500: tests: Rename test for consistency with the rest, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas starting at bol., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e744c602fd 304/500: Replace regex operations with faster alternatives in the lexer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8721f63650 310/500: Merge pull request #79 from j-piecuch/smie, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5fcdd667de 312/500: Make smie-indent-line the default indent function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b902e15c1f 003/500: Create nix-mode.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1e74e5021a 002/500: Create LICENSE, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 616c368898 007/500: Add two spaces after period., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7292d8971c 021/500: Refactor indenting, ELPA Syncer, 2022/01/29