[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode da16900326 293/500: tests: Add a testcase with br
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode da16900326 293/500: tests: Add a testcase with broken identation to have as a check if it indents at all |
Date: |
Sat, 29 Jan 2022 08:27:15 -0500 (EST) |
branch: elpa/nix-mode
commit da169003263886c7ff325f9ff0a7adcbedd3a6e7
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>
tests: Add a testcase with broken identation to have as a check if it
indents at all
This is to prevent bugs with running the indentation code at all in
the future to not have regressions related to that.
---
tests/nix-mode-tests.el | 14 ++++++++++++++
tests/testcases/failed-ident-test.nix | 7 +++++++
2 files changed, 21 insertions(+)
diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 2487ea6674..84c223ce76 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -70,6 +70,20 @@ function to do the indentation tests."
;; Run additional tests
,@body)))
+(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 236318101e 217/500: Cleanup global-nix-mode, (continued)
- [nongnu] elpa/nix-mode 236318101e 217/500: Cleanup global-nix-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 857d963d1e 219/500: Add nix-system function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 58325164ca 232/500: Update README.md, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 36070654c8 243/500: Don’t autoload nix-instantiate., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d2f4a629a8 258/500: Only show derivations in nix store, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d0eb92e97a 263/500: Package linting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 38061187ca 265/500: Add nix-read-file & nix-read-attr, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7d65288c72 266/500: Fix erroneous use of function as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8b3a9927e7 270/500: Add dependency on json-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7a7f600133 288/500: travis: Add travis badge, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode da16900326 293/500: tests: Add a testcase with broken identation to have as a check if it indents at all,
ELPA Syncer <=
- [nongnu] elpa/nix-mode aa43b72a45 014/500: Revert "Use warning font lock for upper case vars", ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5a2674592f 033/500: Don't save-excursion for nix-indent-line., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 233bf03b96 040/500: Add nixfmt command., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ff550f9bbd 036/500: Add comments., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ea95e3c9c6 068/500: Add nix-prettify-mode.el., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6eaf2a97d2 069/500: Fixup hanging indent., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e53d99d840 064/500: Ignore '* chars in syntax propertize., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 9b705381c4 063/500: Fix antiquote highlighting., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0624820fd3 067/500: Fix org-mode fontification error., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3338f5997e 056/500: Fix beginning of buffer issue, ELPA Syncer, 2022/01/29