Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating buttercup to 1.9 breaks lua-mode tests #120

Closed
hillu opened this issue Dec 14, 2017 · 3 comments
Closed

Updating buttercup to 1.9 breaks lua-mode tests #120

hillu opened this issue Dec 14, 2017 · 3 comments

Comments

@hillu
Copy link

hillu commented Dec 14, 2017

Hi,

Running buttercup -L . in a clean checkout of lua-mode with buttercup 1.9 fails some tests that pass using buttercup 1.8. For this, either version had been installed into a Debian/unstable system via the elpa-buttercup package. (AFAICS the Debian package makes no changes to the buttercup code.)

Some advice on how to further debug this would be appreciated.

Here's one of the tracebacks:

========================================
Test fill-paragraph fills single-line comment

Traceback (most recent call last):
  (let ((result-str (butlast (split-string (let ((temp-buffer (generate-new-...
  (butlast (split-string (let ((temp-buffer (generate-new-buffer " *temp*"))...
  (split-string (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-c...
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer ...
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (lua-...
  (unwind-protect (progn (lua-mode) (set (make-local-variable (quote lua-pro...
  (progn (lua-mode) (set (make-local-variable (quote lua-process)) nil) (set...
  (unwind-protect (progn (progn (let ((fill-column 10)) (lua-insert-goto-<> ...
  (progn (progn (let ((fill-column 10)) (lua-insert-goto-<> strs) (execute-k...
  (progn (let ((fill-column 10)) (lua-insert-goto-<> strs) (execute-kbd-macr...
  (let ((fill-column 10)) (lua-insert-goto-<> strs) (execute-kbd-macro (kbd ...
  (if look-at (progn (buttercup-expect (function (lambda nil (quote (point))...
  (progn (buttercup-expect (function (lambda nil (quote (point)) (point))) :...
  (buttercup-expect (lambda nil (quote (point)) (point)) :to-precede (lambda...
  (buttercup--apply-matcher :to-precede ((lambda nil (quote (point)) (point)...
  (apply (lambda (pos regexp) (save-excursion (goto-char pos) (let* ((preced...
  ((lambda (pos regexp) (save-excursion (goto-char pos) (let* ((precedes (lo...
  (save-excursion (goto-char pos) (let* ((precedes (looking-at regexp)) (sub...
  (goto-char (lambda nil (quote (point)) (point)))
error: (wrong-type-argument integer-or-marker-p (lambda nil (quote (point)) (point)))

This is essentially the same issue as described in Debian bug #877398 which I was attempting to fix.

@jorgenschaefer
Copy link
Owner

The way matchers work has changed a bit to allow a much cleaner syntax for checking exception throwing. This was a backwards-incompatible change and I feel suitably bad for not making this more clear to users. Sorry about that.

I think it should work to update https://github.com/immerrr/lua-mode/blob/master/test/utils.el#L35-L47 to use (funcall pos) and (funcall regexp) to get the correct values.

@hillu
Copy link
Author

hillu commented Dec 14, 2017

@jorgenschaefer Thank you, with your advice I was able to patch the Debian package. You may want to document those breaking changes (and how to deal with them).

@jorgenschaefer
Copy link
Owner

You are correct. Added some entry to https://github.com/jorgenschaefer/emacs-buttercup/wiki – thank you, and I hope you continue to enjoy buttercup :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants