"../../lisp/emacs-lisp/comp.el"))
(comp1-src (make-temp-file "stage1-" nil ".el"))
(comp2-src (make-temp-file "stage2-" nil ".el"))
- (comp1 (concat comp1-src "n"))
- (comp2 (concat comp2-src "n"))
;; Can't use debug symbols.
(comp-debug 0))
(copy-file comp-src comp1-src t)
(copy-file comp-src comp2-src t)
(load (concat comp-src "c") nil nil t t)
- (should (null (subr-native-elisp-p (symbol-function #'native-compile))))
+ (should-not (subr-native-elisp-p (symbol-function #'native-compile)))
(message "Compiling stage1...")
- (load (native-compile comp1-src) nil nil t t)
- (should (subr-native-elisp-p (symbol-function 'native-compile)))
- (message "Compiling stage2...")
- (native-compile comp2-src)
- (message "Comparing %s %s" comp1 comp2)
- (should (= (call-process "cmp" nil nil nil comp1 comp2) 0))))
+ (let ((comp1-eln (native-compile comp1-src)))
+ (load comp1-eln nil nil t t)
+ (should (subr-native-elisp-p (symbol-function 'native-compile)))
+ (message "Compiling stage2...")
+ (let ((comp2-eln (native-compile comp2-src)))
+ (message "Comparing %s %s" comp1-eln comp2-eln)
+ (should (= (call-process "cmp" nil nil nil comp1-eln comp2-eln) 0))))))
(ert-deftest comp-tests-provide ()
"Testing top level provide."