[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/shorthand-namespacing 2f95a95 05/11: Add a test for byte-compila
From: |
João Távora |
Subject: |
feature/shorthand-namespacing 2f95a95 05/11: Add a test for byte-compilation |
Date: |
Wed, 22 Sep 2021 18:54:01 -0400 (EDT) |
branch: feature/shorthand-namespacing
commit 2f95a95041d070b60cb54d91480c83e96ea73325
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Add a test for byte-compilation
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-byte-compile-a-file): New test.
(elisp-shorthand-load-a-file): Simplify.
---
test/lisp/progmodes/elisp-mode-tests.el | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/test/lisp/progmodes/elisp-mode-tests.el
b/test/lisp/progmodes/elisp-mode-tests.el
index bc9e103..684ac83 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -1054,9 +1054,29 @@ evaluation of BODY."
(error "this file needs to be loaded")))))
(ert-deftest elisp-shorthand-load-a-file ()
- (let ((load-path (cons elisp--test-resources-dir
- load-path)))
- (load "simple-shorthand-test")
+ (let ((test-file (expand-file-name "simple-shorthand-test.el"
+ elisp--test-resources-dir)))
+ (mapatoms (lambda (s)
+ (when (string-match "^elisp--foo-" (symbol-name s))
+ (unintern s obarray))))
+ (load test-file)
+ (should (intern-soft "elisp--foo-test"))
+ (should-not (intern-soft "f-test"))))
+
+(ert-deftest elisp-shorthand-byte-compile-a-file ()
+
+ (let ((test-file (expand-file-name "simple-shorthand-test.el"
+ elisp--test-resources-dir))
+ (byte-compiled (expand-file-name "simple-shorthand-test.elc"
+ elisp--test-resources-dir)))
+ (mapatoms (lambda (s)
+ (when (string-match "^elisp--foo-" (symbol-name s))
+ (unintern s obarray))))
+ (byte-compile-file test-file)
+ (should-not (intern-soft "f-test"))
+ (should (intern-soft "elisp--foo-test"))
+ (should-not (fboundp (intern-soft "elisp--foo-test")))
+ (load byte-compiled)
(should (intern-soft "elisp--foo-test"))
(should-not (intern-soft "f-test"))))
- branch feature/shorthand-namespacing created (now a2df797), João Távora, 2021/09/22
- feature/shorthand-namespacing d9cab41 01/11: First Elisp version of lisp/shorthand.el, failing some tests, João Távora, 2021/09/22
- feature/shorthand-namespacing fe4e4c2 04/11: Integrate shorthand functionality into elisp-mode.el, João Távora, 2021/09/22
- feature/shorthand-namespacing 82528bc 03/11: Robustify checking of shorthand-shorthands, João Távora, 2021/09/22
- feature/shorthand-namespacing 881478b 10/11: Consider shorthands in Elisp's elisp-completion-at-point, João Távora, 2021/09/22
- feature/shorthand-namespacing 2f95a95 05/11: Add a test for byte-compilation,
João Távora <=
- feature/shorthand-namespacing d102e30 07/11: Rework docstring of hack-elisp-shorthands, João Távora, 2021/09/22
- feature/shorthand-namespacing eed51f2 08/11: Adjust C style and add comments to shorthand code, João Távora, 2021/09/22
- feature/shorthand-namespacing 62523a0 06/11: Rework elisp-shorthands to only allow only prefix substitution, João Távora, 2021/09/22
- feature/shorthand-namespacing a2df797 11/11: Add mechanism for escaping shorthand substitution, João Távora, 2021/09/22
- feature/shorthand-namespacing 5811e05 02/11: Move most of the shorthand implementation to C code, João Távora, 2021/09/22
- feature/shorthand-namespacing 39a63cd 09/11: * lisp/emacs-lisp/magnars-string.el: New file., João Távora, 2021/09/22