[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 6d2d764 094/385: skeleton for indentation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 6d2d764 094/385: skeleton for indentation tests |
Date: |
Tue, 5 Oct 2021 23:59:08 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 6d2d76480699773cf109c3dfd9385ec1ee777c7e
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
skeleton for indentation tests
---
test/haskell-tng-indent-test.el | 53 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 47 insertions(+), 6 deletions(-)
diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el
index 7c8321d..63e3791 100644
--- a/test/haskell-tng-indent-test.el
+++ b/test/haskell-tng-indent-test.el
@@ -12,20 +12,61 @@
"test/haskell-tng-testutils.el")
(ert-deftest haskell-tng-indent-file-tests ()
- ;; FIXME four kinds of indentation test:
+ ;; Four indentation regression tests are possible:
;;
;; 1. newline-and-indent when writing code
;; 2. ... with subsequent indent-line-function cycles
;; 3. indent-line-function at the beginning of an existing line
;; 4. ... with subsequent indent-line-function cycles
;;
- ;; Expectations could use lines of | and . to indicate where the
- ;; indentation(s) go. 1 and 2 are the most interesting so could be combined
- ;; into one test. 3 and 4 could also be combined.
- ;;
- ;; (should (have-expected-newline-indent (testdata "src/layout.hs")))
+ ;; Expectations could use lines of symbols such as | and . or digits to
+ ;; indicate where the indentation(s) go. 1 and 2 are the most interesting so
+ ;; could be combined into one test. 3 and 4 could also be combined.
+
+ (should (have-expected-newline-indent (testdata "src/layout.hs")))
;; (should (have-expected-indent (testdata "src/layout.hs")))
+ ;; (should (have-expected-newline-indent (testdata "src/medley.hs")))
+ ;; (should (have-expected-indent (testdata "src/medley.hs")))
+
+ )
+
+(defun haskell-tng-indent-test:newline-indents ()
+ ;; FIXME
+ )
+
+(defun haskell-tng-indent-test:indents ()
+ ;; FIXME
)
+(defun haskell-tng-indent-test:indents-to-string (indents)
+ "INDENTS is a list of INDENT which are a non-empty list of
+column numbers indicating the suggested indentation levels. The
+head entry is the newline-and-indent and the rest are the
+indent-line-function cycles."
+ ;; FIXME
+ )
+
+(defun haskell-tng-indent-test:indent-to-string (indent)
+ ;; FIXME
+ )
+
+(defun have-expected-newline-indent (file)
+ (haskell-tng-testutils:assert-file-contents
+ file
+ #'haskell-tng-mode
+ (lambda ()
+ (haskell-tng-indent-test:indents-to-string
+ (haskell-tng-indent-test:newline-indents)))
+ "newline-indent"))
+
+(defun have-expected-indent (file)
+ (haskell-tng-testutils:assert-file-contents
+ file
+ #'haskell-tng-mode
+ (lambda ()
+ (haskell-tng-indent-test:indents-to-string
+ (haskell-tng-indent-test:indents)))
+ "indent"))
+
;;; haskell-tng-indent-test.el ends here
- [nongnu] elpa/haskell-tng-mode c48e7a5 069/385: starting to transcribe the expression table, (continued)
- [nongnu] elpa/haskell-tng-mode c48e7a5 069/385: starting to transcribe the expression table, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1f1110a 073/385: transcribe the grammar rules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 01789b1 075/385: y u no haskell-mode?, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b8f3e3f 079/385: back out incomplete grammar rules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9e19b2b 080/385: double down on simpler grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6e7a24f 083/385: lexer identifies conid / varid, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b12e49a 086/385: consym, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7d6fa3d 091/385: thoughts on lexers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6a05d12 090/385: planning for indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2060f7a 092/385: thoughts on indentation testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6d2d764 094/385: skeleton for indentation tests,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 0d04664 115/385: implement batch compilation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode adb3c50 143/385: better insert indentation suggestions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e79577e 132/385: match ghc source paths when compiling, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8ec4807 145/385: somehow dropped font-lock-extend-region-multiline, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d3a6a22 147/385: no todos in the test/src dir, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 85f20b1 154/385: indent coproducts, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3dbb883 013/385: more progress on multiline type expansion, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c6382e1 036/385: almost got it with imports, then I lost it..., ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f3e3838 070/385: starting to transcribe the expression table, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ceaec13 098/385: groundwork for tab cycling, ELPA Syncer, 2021/10/06