branch: elpa/sly
commit 0dfe5a506450532217b080a0ecfab6150c3c976b
Author: André A. Gomes <[email protected]>
Commit: André A. Gomes <[email protected]>
Reapply "Try yet again to get stabler indentation tests on Travis"
This reverts commit 52e96126f6762558a76d031f05b2d3608ed2b105.
It seems that GitHub Actions suffer from the same unknown issue as Travis
CI.
---
lib/sly-tests.el | 2 +-
test/sly-indentation-tests.el | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/sly-tests.el b/lib/sly-tests.el
index 106ba27ff4b..b52f88009b6 100644
--- a/lib/sly-tests.el
+++ b/lib/sly-tests.el
@@ -1081,7 +1081,7 @@ the buffer's undo-list."
(dolist (marker point-markers)
(search-backward marker)
(beginning-of-defun)
- (indent-sexp))
+ (indent-region (point) (progn (end-of-defun) (point))))
(sly-test-expect "Correct buffer content"
buffer-content
(substring-no-properties (buffer-string)))))
diff --git a/test/sly-indentation-tests.el b/test/sly-indentation-tests.el
index e4a726579b6..93bfef0a6df 100644
--- a/test/sly-indentation-tests.el
+++ b/test/sly-indentation-tests.el
@@ -48,9 +48,11 @@
(when (string= mess expected)
(ert-fail "Could not mess up indentation?"))
(goto-char (point-min))
- (if (eq sly-indentation--test-function 'indent-region)
- (indent-region (point-min) (point-max))
- (indent-sexp))
+ (indent-region (point-min) (point-max)) ;; Used to be
+ ;; ‘indent-sexp’, but
+ ;; was super unstable
+ ;; on travis, for
+ ;; some reason.
(delete-trailing-whitespace)
(let ((expected-lines (split-string expected "\n"))
(observed-lines (split-string (buffer-string) "\n")))