[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 3c5e3ca 05/10: * test/src/comp-test-funcs.el (comp-t
From: |
Andrea Corallo |
Subject: |
feature/native-comp 3c5e3ca 05/10: * test/src/comp-test-funcs.el (comp-test-big-interactive): New test |
Date: |
Sun, 29 Mar 2020 09:12:52 -0400 (EDT) |
branch: feature/native-comp
commit 3c5e3ca2badeda8637e84586eace6ba619f0110a
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* test/src/comp-test-funcs.el (comp-test-big-interactive): New test
---
test/src/comp-test-funcs.el | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el
index 46d324b..67b8575 100644
--- a/test/src/comp-test-funcs.el
+++ b/test/src/comp-test-funcs.el
@@ -403,6 +403,41 @@
(?< 1)
(?> 2))))
+(defun comp-test-big-interactive (filename &optional force arg load)
+ ;; Check non trivial interactive form using `byte-recompile-file'.
+ (interactive
+ (let ((file buffer-file-name)
+ (file-name nil)
+ (file-dir nil))
+ (and file
+ (derived-mode-p 'emacs-lisp-mode)
+ (setq file-name (file-name-nondirectory file)
+ file-dir (file-name-directory file)))
+ (list (read-file-name (if current-prefix-arg
+ "Byte compile file: "
+ "Byte recompile file: ")
+ file-dir file-name nil)
+ current-prefix-arg)))
+ (let ((dest (byte-compile-dest-file filename))
+ ;; Expand now so we get the current buffer's defaults
+ (filename (expand-file-name filename)))
+ (if (if (file-exists-p dest)
+ ;; File was already compiled
+ ;; Compile if forced to, or filename newer
+ (or force
+ (file-newer-than-file-p filename dest))
+ (and arg
+ (or (eq 0 arg)
+ (y-or-n-p (concat "Compile "
+ filename "? ")))))
+ (progn
+ (if (and noninteractive (not byte-compile-verbose))
+ (message "Compiling %s..." filename))
+ (byte-compile-file filename load))
+ (when load
+ (load (if (file-exists-p dest) dest filename)))
+ 'no-byte-compile)))
+
(provide 'comp-test-funcs)
;;; comp-test-funcs.el ends here
- feature/native-comp updated (bb0496e -> 00ee320), Andrea Corallo, 2020/03/29
- feature/native-comp 05f89e8 02/10: src/comp.c (Fcomp__init_ctxt): Aesthetic, Andrea Corallo, 2020/03/29
- feature/native-comp 9d8ce52 03/10: * comp.c (maybe_defer_native_compilation): Compile comp dependecies., Andrea Corallo, 2020/03/29
- feature/native-comp 3c5e3ca 05/10: * test/src/comp-test-funcs.el (comp-test-big-interactive): New test,
Andrea Corallo <=
- feature/native-comp 79483a5 01/10: * .gitlab-ci.yml (test-native-bootstrap-speed*): Timeout to 8h, Andrea Corallo, 2020/03/29
- feature/native-comp d5f6dc1 04/10: Prevent collisions in C namespace and function shadowing, Andrea Corallo, 2020/03/29
- feature/native-comp 89cbff3 06/10: * test/src/comp-tests.el (comp-tests-doc): Fix, Andrea Corallo, 2020/03/29
- feature/native-comp 530faee 09/10: Fix free function compilation, Andrea Corallo, 2020/03/29
- feature/native-comp c69c185 07/10: Add comp-test-40187 checking function shadowing., Andrea Corallo, 2020/03/29
- feature/native-comp 53f9bc6 08/10: * comp.el (comp-output-base-filename): Handle src being a symbol, Andrea Corallo, 2020/03/29
- feature/native-comp 00ee320 10/10: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/29