unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: emacs-29 c54bda15e35: Reset abbrevs-changed after saving abbrevs (bug#62208)
       [not found] ` <20230317141157.939DBC13919@vcs2.savannah.gnu.org>
@ 2023-03-18  9:59   ` Robert Pluim
  2023-03-18 10:36     ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Pluim @ 2023-03-18  9:59 UTC (permalink / raw)
  To: emacs-devel; +Cc: Filipp Gunbin

>>>>> On Fri, 17 Mar 2023 10:11:57 -0400 (EDT), Filipp Gunbin <fgunbin@fastmail.fm> said:
 
    Filipp> +(ert-deftest abbrev--possibly-save-test ()
    Filipp> +  "Test that `abbrev--possibly-save' properly resets
    Filipp> +`abbrevs-changed'."
    Filipp> +  (ert-with-temp-file temp-test-file
    Filipp> +    (let ((abbrev-file-name temp-test-file)
    Filipp> +          (save-abbrevs t))
    Filipp> +      ;; Save
    Filipp> +      (let ((abbrevs-changed t))
    Filipp> +        (should-not (abbrev--possibly-save nil t))
    Filipp> +        (should-not abbrevs-changed))
    Filipp> +      ;; Don't save
    Filipp> +      (let ((abbrevs-changed t))
    Filipp> +        (ert-simulate-keys '(?n)
    Filipp> +          (should (abbrev--possibly-save nil)))
    Filipp> +        (should-not abbrevs-changed)))))
    Filipp> +
    Filipp>  (provide 'abbrev-tests)

This test works when run interactively in Emacs, but fails when run
from 'make':

Test abbrev--possibly-save-test backtrace:
  signal(minibuffer-quit nil)
  #f(compiled-function () #<bytecode 0x198108c2bb83>)()
  read-string(#("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? (y ...
  y-or-n-p("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? ")
  abbrev--possibly-save(nil)
  apply(abbrev--possibly-save nil)
  (setq value-324 (apply fn-322 args-323))
  (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq form-
  (if (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq f
  (let (form-description-326) (if (unwind-protect (setq value-324 (app
  (let ((value-324 'ert-form-evaluation-aborted-325)) (let (form-descr
  (let* ((fn-322 #'abbrev--possibly-save) (args-323 (condition-case er
  (let ((unread-command-events (append '(110) '(7 7 7))) (executing-kb
  (let ((abbrevs-changed t)) (let ((unread-command-events (append '(11
  (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (let ((abb
  (progn (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (le
  (unwind-protect (progn (let ((abbrev-file-name temp-test-file) (save
  (let* ((coding-system-for-write nil) (temp-file (identity (make-temp
  (closure (t) nil (let* ((coding-system-for-write nil) (temp-file (id
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name abbrev--possibly-save-test :documenta
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/abbrev-tests.el" "--
  command-line()
  normal-top-level()
Test abbrev--possibly-save-test condition:
    (minibuffer-quit)

Robert
-- 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: emacs-29 c54bda15e35: Reset abbrevs-changed after saving abbrevs (bug#62208)
  2023-03-18  9:59   ` emacs-29 c54bda15e35: Reset abbrevs-changed after saving abbrevs (bug#62208) Robert Pluim
@ 2023-03-18 10:36     ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-03-18 10:36 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel, fgunbin

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Filipp Gunbin <fgunbin@fastmail.fm>
> Date: Sat, 18 Mar 2023 10:59:26 +0100
> 
> >>>>> On Fri, 17 Mar 2023 10:11:57 -0400 (EDT), Filipp Gunbin <fgunbin@fastmail.fm> said:
>  
>     Filipp> +(ert-deftest abbrev--possibly-save-test ()
>     Filipp> +  "Test that `abbrev--possibly-save' properly resets
>     Filipp> +`abbrevs-changed'."
>     Filipp> +  (ert-with-temp-file temp-test-file
>     Filipp> +    (let ((abbrev-file-name temp-test-file)
>     Filipp> +          (save-abbrevs t))
>     Filipp> +      ;; Save
>     Filipp> +      (let ((abbrevs-changed t))
>     Filipp> +        (should-not (abbrev--possibly-save nil t))
>     Filipp> +        (should-not abbrevs-changed))
>     Filipp> +      ;; Don't save
>     Filipp> +      (let ((abbrevs-changed t))
>     Filipp> +        (ert-simulate-keys '(?n)
>     Filipp> +          (should (abbrev--possibly-save nil)))
>     Filipp> +        (should-not abbrevs-changed)))))
>     Filipp> +
>     Filipp>  (provide 'abbrev-tests)
> 
> This test works when run interactively in Emacs, but fails when run
> from 'make':
> 
> Test abbrev--possibly-save-test backtrace:
>   signal(minibuffer-quit nil)
>   #f(compiled-function () #<bytecode 0x198108c2bb83>)()
>   read-string(#("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? (y ...
>   y-or-n-p("Save abbrevs in /tmp/emacs-test-7WxM64-abbrev? ")
>   abbrev--possibly-save(nil)
>   apply(abbrev--possibly-save nil)
>   (setq value-324 (apply fn-322 args-323))
>   (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq form-
>   (if (unwind-protect (setq value-324 (apply fn-322 args-323)) (setq f
>   (let (form-description-326) (if (unwind-protect (setq value-324 (app
>   (let ((value-324 'ert-form-evaluation-aborted-325)) (let (form-descr
>   (let* ((fn-322 #'abbrev--possibly-save) (args-323 (condition-case er
>   (let ((unread-command-events (append '(110) '(7 7 7))) (executing-kb
>   (let ((abbrevs-changed t)) (let ((unread-command-events (append '(11
>   (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (let ((abb
>   (progn (let ((abbrev-file-name temp-test-file) (save-abbrevs t)) (le
>   (unwind-protect (progn (let ((abbrev-file-name temp-test-file) (save
>   (let* ((coding-system-for-write nil) (temp-file (identity (make-temp
>   (closure (t) nil (let* ((coding-system-for-write nil) (temp-file (id
>   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>   ert-run-test(#s(ert-test :name abbrev--possibly-save-test :documenta
>   ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
>   ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
>   ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
>   ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
>   eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
>   command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/abbrev-tests.el" "--
>   command-line()
>   normal-top-level()
> Test abbrev--possibly-save-test condition:
>     (minibuffer-quit)

Thanks, should be fixed now.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-18 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <167906231726.19136.16436390026673507290@vcs2.savannah.gnu.org>
     [not found] ` <20230317141157.939DBC13919@vcs2.savannah.gnu.org>
2023-03-18  9:59   ` emacs-29 c54bda15e35: Reset abbrevs-changed after saving abbrevs (bug#62208) Robert Pluim
2023-03-18 10:36     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).