[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tuareg 3e943c3 01/10: Tests commenting: move the `should'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/tuareg 3e943c3 01/10: Tests commenting: move the `should' outside `let' |
Date: |
Fri, 27 Aug 2021 09:57:35 -0400 (EDT) |
branch: elpa/tuareg
commit 3e943c3b52519c68b7ffcfe6389297c261c2e844
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Tests commenting: move the `should' outside `let'
This makes it easier to spot which test fails.
---
tuareg-tests.el | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/tuareg-tests.el b/tuareg-tests.el
index 6c7c523..7118a4b 100644
--- a/tuareg-tests.el
+++ b/tuareg-tests.el
@@ -578,33 +578,38 @@ Return (FILE TYPE START-LINE END-LINE START-COL END-COL)."
(ert-deftest tuareg-comment-region-style ()
"Check that commenting out code works as expected. See issue #216."
;; Non-indented code.
- (let ((comment-style 'indent))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'indent))
+ (equal (tuareg-test--comment-region
"let f x =\n g x\n y\n")
"(* let f x = *)\n(* g x *)\n(* y *)\n")))
- (let ((comment-style 'multi-line)
- (comment-continue " * "))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'multi-line)
+ (comment-continue " * "))
+ (equal (tuareg-test--comment-region
"let f x =\n g x\n y\n")
"(* let f x =\n * g x\n * y *)\n")))
- (let ((comment-style 'multi-line)
- (comment-continue " "))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'multi-line))
+ ;; `comment-continue' should default to " * "
+ (equal (tuareg-test--comment-region
+ "let f x =\n g x\n y\n")
+ "(* let f x =\n * g x\n * y *)\n")))
+ (should (let ((comment-style 'multi-line)
+ (comment-continue " "))
+ (equal (tuareg-test--comment-region
"let f x =\n g x\n y\n")
"(* let f x =\n g x\n y *)\n")))
;; Indented code.
- (let ((comment-style 'indent))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'indent))
+ (equal (tuareg-test--comment-region
" epsilon\n tau\n")
" (* epsilon *)\n (* tau *)\n")))
- (let ((comment-style 'multi-line)
- (comment-continue " * "))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'multi-line)
+ (comment-continue " * "))
+ (equal (tuareg-test--comment-region
" epsilon\n tau\n")
" (* epsilon\n * tau *)\n")))
- (let ((comment-style 'multi-line)
- (comment-continue " "))
- (should (equal (tuareg-test--comment-region
+ (should (let ((comment-style 'multi-line)
+ (comment-continue " "))
+ (equal (tuareg-test--comment-region
" epsilon\n tau\n")
" (* epsilon\n tau *)\n"))))
- [nongnu] elpa/tuareg updated (d2b38f0 -> f6801c8), ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 4e0ff99 02/10: Consistently support space-only `comment-continue' on Emacs < 28, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 0fe4473 03/10: Improve tuareg.el header, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 2c75e58 05/10: Makefile: remove SMIE toggle, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg e98e55d 06/10: Add sample OCaml code to test highlighting, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 3e943c3 01/10: Tests commenting: move the `should' outside `let',
ELPA Syncer <=
- [nongnu] elpa/tuareg 742037b 04/10: Update the comment of the code putting 'ocaml error regexp first, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg c55a9db 07/10: Add badges for NonGNU ELPA and Debian, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 6357f82 08/10: Update OPAM file, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg de7e6c4 09/10: Use the default commenting style & explain how to customize this, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg f6801c8 10/10: Update Tuareg header, ELPA Syncer, 2021/08/27