[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 54ef833100 294/500: Merge pull request #68 from e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 54ef833100 294/500: Merge pull request #68 from etu/fix-recent-regressions |
Date: |
Sat, 29 Jan 2022 08:27:15 -0500 (EST) |
branch: elpa/nix-mode
commit 54ef83310095689443c2371a312cc8687af6cbb9
Merge: 01c53b7ff1 da16900326
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #68 from etu/fix-recent-regressions
Fix recent regressions
---
nix-mode.el | 3 +--
tests/nix-mode-tests.el | 16 +++++++++++++++-
tests/testcases/failed-ident-test.nix | 7 +++++++
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/nix-mode.el b/nix-mode.el
index 73d12a5e63..300f7de99e 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -117,7 +117,7 @@ Valid functions for this are:
(defconst nix-re-quotes "''\\|\"")
-(defconst nix-re-comments "#\\|/\\*\\|\\*/")
+(defconst nix-re-comments "#\\|/*\\|*/")
(defconst nix-font-lock-keywords
`((,(regexp-opt nix-keywords 'symbols) 0 'nix-keyword-face)
@@ -628,7 +628,6 @@ The hook `nix-mode-hook' is run when Nix mode is started.
;; Automatic indentation [C-j]
(setq-local indent-line-function nix-indent-function)
- (set (make-local-variable 'indent-region-function) 'nix-indent-region)
;; Indenting of comments
(setq-local comment-start "# ")
diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 7505908834..84c223ce76 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -70,7 +70,21 @@ function to do the indentation tests."
;; Run additional tests
,@body)))
-(ert-deftest nix-mode-indent-test-list-contents ()
+(ert-deftest nix-mode-test-indent-failed-ident ()
+ "Proper indentation for items inside of a list."
+ (with-nix-mode-test
+ ;; File to read
+ ("failed-ident-test.nix")
+
+ ;; Indent the buffer
+ (indent-region (point-min) (point-max))
+
+ ;; Compare buffer to the stored buffer contents
+ (should-not (equal
+ (buffer-substring-no-properties (point-min) (point-max))
+ raw-file))))
+
+(ert-deftest nix-mode-test-indent-list-contents ()
"Proper indentation for items inside of a list."
(with-nix-mode-test ("list-contents.nix" :indent t)))
diff --git a/tests/testcases/failed-ident-test.nix
b/tests/testcases/failed-ident-test.nix
new file mode 100644
index 0000000000..6d01f9d2c2
--- /dev/null
+++ b/tests/testcases/failed-ident-test.nix
@@ -0,0 +1,7 @@
+# This file is wrongly idented on purpose to have a failing test if the indent
+# doesn't run at all.
+[
+47
+"string"
+true
+]
- [nongnu] elpa/nix-mode c4e4f386b7 490/500: chore: Add nix-flake.el to Cask, (continued)
- [nongnu] elpa/nix-mode c4e4f386b7 490/500: chore: Add nix-flake.el to Cask, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 10fc00dba8 015/500: Fix bad setting for indent-tabs-mode., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 630cc427cd 009/500: Update builtins, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 295bcbd919 023/500: Don't indent strings, comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7a97635267 025/500: Move to nix-re-file-path, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c08ae1cdfe 049/500: Add limit arg to looking-back., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 504285ce39 138/500: Remove nix-buffer, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c06222659c 185/500: Don’t enable mmm-mode automatically, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 858d127fb5 259/500: Add custom for directory location, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6445ebfad6 285/500: Merge pull request #63 from etu/ert-indent-testing, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 54ef833100 294/500: Merge pull request #68 from etu/fix-recent-regressions,
ELPA Syncer <=
- [nongnu] elpa/nix-mode e8921b8a78 295/500: Prioritize closing } over regular indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 80a1e96c71 296/500: Merge branch 'grahamc-fix-issue-69', ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 53ea839a52 418/500: Replace javascript-mode with js-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aae6f710e0 404/500: Address review comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d27820b040 442/500: Merge pull request #131 from nagy/nix-process-refactor, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5f44621864 474/500: nix-flake: Make the argument bindings more predictable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a18a226ce9 123/500: Add nix-mode tests., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 9e59bcf59e 216/500: Fix read only .drv file issue, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8ab089b251 230/500: Set nix-shell-attribute, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 84ee98019f 271/500: Skip over comments in indentation, ELPA Syncer, 2022/01/29