[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 6dd5a5c659 2/2: Add test and update manual foll
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 6dd5a5c659 2/2: Add test and update manual following change in auto-insert |
Date: |
Thu, 17 Nov 2022 14:59:36 -0500 (EST) |
branch: elpa/sweeprolog
commit 6dd5a5c6590fdf1142bf2afa35c28923d34d4c6e
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Add test and update manual following change in auto-insert
---
README.org | 2 +-
sweeprolog-tests.el | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index 7d176a864a..5ba7cb7ee9 100644
--- a/README.org
+++ b/README.org
@@ -853,7 +853,7 @@ As an example, after inserting the module skeleton, a new
Prolog file
:- module(foo, []).
- /** <module> foo
+ /** <module>
,*/
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index 202eb2cfd7..5decdae002 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -105,6 +105,20 @@ foo(Foo) :- bar.
'(sweeprolog-undefined-default-face
sweeprolog-body-default-face)))))
+(ert-deftest auto-insert-module-header ()
+ "Tests inserting Prolog module header with `auto-insert'."
+ (find-file-literally (expand-file-name "sweeprolog_test_auto_insert.pl"
+ temporary-file-directory))
+ (sweeprolog-mode)
+ (let ((auto-insert-query nil))
+ (call-interactively #'auto-insert))
+ (let ((end (point)))
+ (beginning-of-line -1)
+ (should (string= (buffer-substring-no-properties (point) end)
+ ":- module(sweeprolog_test_auto_insert, []).
+
+/** <module> "))))
+
(ert-deftest complete-atom ()
"Tests completing atoms."
(let ((temp (make-temp-file "sweeprolog-test"