[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode d3d3d7e 188/192: Add indentation tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode d3d3d7e 188/192: Add indentation tests |
Date: |
Sun, 29 Aug 2021 11:02:15 -0400 (EDT) |
branch: elpa/dart-mode
commit d3d3d7e1ad0c524d967a6f8528bd883d2a7fdd45
Author: Brady Trainor <mail@bradyt.net>
Commit: Brady Trainor <mail@bradyt.net>
Add indentation tests
---
Makefile | 11 +++++++++--
test/{test.el => test-font-lock.el} | 0
test/test-indentation.el | 20 ++++++++++++++++++++
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 4e9a0ac..ac59e2b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,15 @@ package-lint: .cask
dart-mode.elc:
emacs -batch -f batch-byte-compile dart-mode.el
-test: .cask dart-mode.elc
- cask emacs -batch -l dart-mode.elc -l ert -l test/test.el -f
ert-run-tests-batch-and-exit
+test-setup: .cask dart-mode.elc
+
+test-font-lock: test-setup
+ cask emacs -batch -l dart-mode.elc -l ert -l test/test-font-lock.el -f
ert-run-tests-batch-and-exit
+
+test-indentation: test-setup
+ cask emacs -batch -l dart-mode.elc -l ert -l test/test-indentation.el
-f ert-run-tests-batch-and-exit
+
+test: test-font-lock test-indentation
checkdoc:
emacs -batch -eval "(when (>= emacs-major-version 25) (checkdoc-file
\"dart-mode.el\"))"
diff --git a/test/test.el b/test/test-font-lock.el
similarity index 100%
rename from test/test.el
rename to test/test-font-lock.el
diff --git a/test/test-indentation.el b/test/test-indentation.el
new file mode 100644
index 0000000..821aaaf
--- /dev/null
+++ b/test/test-indentation.el
@@ -0,0 +1,20 @@
+
+(defun dart-ert-test-indentation-of-file (file)
+ (with-temp-buffer
+ (insert-file-contents file)
+ (let ((orig-length (buffer-size)))
+ (dart-mode)
+ (let ((inhibit-message t))
+ (indent-region (point-min) (point-max)))
+ (= (buffer-size) orig-length))))
+
+(ert-deftest dart-indentation-test ()
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/classes.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/comments.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/control-flow-statements.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/exceptions.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/functions.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/hello-world.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/imports.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/interfaces-and-abstract-classes.dart"))
+ (should (dart-ert-test-indentation-of-file
"test/faceup/language-samples/variables.dart")))
- [nongnu] elpa/dart-mode 847707d 129/192: Require final newline, like dartfmt, (continued)
- [nongnu] elpa/dart-mode 847707d 129/192: Require final newline, like dartfmt, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 570e58c 116/192: Refactor formatter support, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d4da484 126/192: Removes nil c-syntactic-context (#56), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 7c28c58 131/192: Add Travis-CI and Cask, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode adef2a5 118/192: Be more resilient to server crashes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 61f334c 149/192: Improves indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 47dc5a0 146/192: Fixes flycheck in Windows, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 6e1c42f 156/192: Fontify string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d78c5c7 142/192: Bump version to 1.0.4, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1031016 141/192: Edit README to melpa rather than marmalade, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d3d3d7e 188/192: Add indentation tests,
ELPA Syncer <=
- [nongnu] elpa/dart-mode e94acb5 168/192: Fontify SCREAMING_CAPS words of length greater than two as constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c51e750 163/192: Stop testing 24.3 on travis, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 735868e 154/192: Copy/paste multiline string syntax-propertize from python.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9ad52e8 158/192: Search for sdk from flutter if no dart on path, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c568118 175/192: Move dart server code to a separate repo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ae8a28b 161/192: Follow conventions in font-lock levels, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 327b9aa 167/192: Use conventions in commentary, docstrings, defvar vs setq, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 31861e8 173/192: Add mixin keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 28ebbaf 176/192: Update tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ea60ffd 178/192: Move README back to markdown, ELPA Syncer, 2021/08/29