From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#21701: 25.0.50; ert explainer for equal can't handle negative numbers (work in 24.5) Date: Sun, 18 Oct 2015 10:56:58 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11431b66164c7205225d362a X-Trace: ger.gmane.org 1445158697 6302 80.91.229.3 (18 Oct 2015 08:58:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2015 08:58:17 +0000 (UTC) To: 21701@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 18 10:58:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Znjn6-00006h-GG for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Oct 2015 10:58:08 +0200 Original-Received: from localhost ([::1]:32920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjn5-0003cF-M5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Oct 2015 04:58:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjn1-0003c5-SY for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:58:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znjn0-00015w-9L for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:58:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjn0-00015s-5u for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Znjmz-0004xQ-Vt for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2015 08:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144515863419001 (code B ref -1); Sun, 18 Oct 2015 08:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2015 08:57:14 +0000 Original-Received: from localhost ([127.0.0.1]:54777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnjmD-0004wO-2g for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57497) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZnjmA-0004wE-As for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znjm8-0000hY-L0 for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:09 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjm8-0000hU-5g for submit@debbugs.gnu.org; Sun, 18 Oct 2015 04:57:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjm0-0003YR-Oa for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:57:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znjlz-0000gR-6b for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:57:00 -0400 Original-Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:35904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znjlz-0000gF-0t for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2015 04:56:59 -0400 Original-Received: by vkex70 with SMTP id x70so82696249vke.3 for ; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2MX6VIp/eRkVB8SRXrIGf+8CJrZZEJE/BG4CmmX/txE=; b=CWMj1wXQ20f+KZ1uOiSjFy2E5ajybTfOD2ilBad6LyKRwrUAAtrrZY7/nnB+WXRrDD /l/KaDWwWS5AEbxyTieJ240Ecz+24b5YIslg1bnrc+LIlL74+96gpXhGD7e8pToBlCxT JV1akWsjte6DjdT6Us5LDrYulV4j5hUcL0FRWUagJyhzdP2Vjz02jHntvHDV5lSeb8ly 4eR/layxwQ0JA9zMfoCO+PF5SdSRObuUSz9vJ9iwFcICzUfZOeeLqPV3Hl+kI1pQW3K8 t4UB9wfirvtWStp7vYvjwTJjyWtXDRNMir7Y63mWT57dxcTmgWphMAZ9YkD01DqhGhd/ lHwg== X-Received: by 10.31.170.68 with SMTP id t65mr14655377vke.31.1445158618284; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) Original-Received: by 10.31.210.134 with HTTP; Sun, 18 Oct 2015 01:56:58 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107706 Archived-At: --001a11431b66164c7205225d362a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Steps to repeat, eval the following and run `ert'. (ert-deftest bad-equal () (should (equal 23 -50))) Instead of a normal Ert error, the following is reported: A bad-equal aborted When placing the cursor on the error and press "d" (to run the test case in the debugger), the following call stack is presented: apply(debug (error (wrong-type-argument characterp -50))) ert--run-test-debugger([cl-struct-ert--test-execution-info... #[128 "\301\300=02\"\207" [[cl-struct-ert--test-execution-info ... format("?%c" -50) ert--explain-format-atom(-50) ert--explain-equal-rec(23 -50) ert--explain-equal(23 -50) apply(ert--explain-equal (23 -50)) (list :explanation (apply -explainer- args-1)) Clearly, the code is trying to print -50 as a character. This worked in Emacs 24.5, where Ert reported: F bad-equal (ert-test-failed ((should (equal 23 -50)) :form (equal 23 -50) :value nil :explanation (different-atoms (23 "#x17" "?=17") (-50 "#x3fffffffffffffce")))) Sincerely, Anders Lindgren In GNU Emacs 25.0.50.158 (x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F27)) of 2015-10-16 Repository revision: ff4798b8b493ba1ec51dcb1c59a11824865124b8 Windowing system distributor 'Apple', version 10.3.1348 Configured using: 'configure --with-ns --without-dbus' Configured features: ACL ZLIB TOOLKIT_SCROLL_BARS NS Important settings: value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: ERT-Results Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. bad-equal Ran 1 tests, 0 results were as expected, 1 unexpected Running test bad-equal... Entering debugger... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils pp cl-extra help-mode cl-macs gv ert find-func ewoc easymenu debug cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 89635 5963) (symbols 48 19436 0) (miscs 40 78 159) (strings 32 15385 4052) (string-bytes 1 463936) (vectors 16 12257) (vector-slots 8 415700 5035) (floats 8 162 183) (intervals 56 271 6) (buffers 976 14)) --001a11431b66164c7205225d362a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steps to repeat, eval the following and run `ert'.
=
(ert-deftest bad-equal ()
=C2=A0 (should (equal 23 -50)))

Ins= tead of a normal Ert error, the following is reported:

A bad-equal=C2=A0 =C2=A0 aborted

When placing the cursor on the error and pre= ss "d" (to run the test case in the debugger), the following call= stack is presented:

=C2=A0 apply(debug (error (wrong-type-argument = characterp -50)))
=C2=A0 ert--run-test-debugger([cl-struct-ert--test-exe= cution-info...
=C2=A0 #[128 "\301\300=02\"\207" [[cl-stru= ct-ert--test-execution-info ...
=C2=A0 format("?%c" -50)
= =C2=A0 ert--explain-format-atom(-50)
=C2=A0 ert--explain-equal-rec(23 -5= 0)
=C2=A0 ert--explain-equal(23 -50)
=C2=A0 apply(ert--explain-equal = (23 -50))
=C2=A0 (list :explanation (apply -explainer- args-1))

C= learly, the code is trying to print -50 as a character.

This worked = in Emacs 24.5, where Ert reported:

F bad-equal
=C2=A0 =C2=A0 (ert= -test-failed
=C2=A0 =C2=A0 =C2=A0((should
=C2=A0 =C2=A0 =C2=A0 =C2=A0= (equal 23 -50))
=C2=A0 =C2=A0 =C2=A0 :form
=C2=A0 =C2=A0 =C2=A0 (equa= l 23 -50)
=C2=A0 =C2=A0 =C2=A0 :value nil :explanation
=C2=A0 =C2=A0 = =C2=A0 (different-atoms
=C2=A0 =C2=A0 =C2=A0 =C2=A0(23 "#x17" = "?=17")
=C2=A0 =C2=A0 =C2=A0 =C2=A0(-50 "#x3fffffffffffff= ce"))))


Sincerely,
=C2=A0 =C2=A0 Anders Lindgren

In GNU Emacs 25.0.50.158 (x86_64-apple-darwin14.5.0, NS appkit-1348.17= Version 10.10.5 (Build 14F27))
=C2=A0of 2015-10-16
Repository revisi= on: ff4798b8b493ba1ec51dcb1c59a11824865124b8
Windowing system distributo= r 'Apple', version 10.3.1348
Configured using:
=C2=A0'con= figure --with-ns --without-dbus'

Configured features:
ACL ZLI= B TOOLKIT_SCROLL_BARS NS

Important settings:
=C2=A0 value of $LC_= CTYPE: UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: = ERT-Results

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2= =A0 global-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-= wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2= =A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 f= ont-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-= mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: = t
=C2=A0 buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 tra= nsient-mark-mode: t

Recent messages:
For information about GNU Em= acs and the GNU system, type C-h C-a.
bad-equal
Ran 1 tests, 0 result= s were as expected, 1 unexpected
Running test bad-equal...
Entering d= ebugger...

Load-path shadows:
None found.

Features:
(sh= adow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 = mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev = gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fn= s mail-prsvr mail-utils pp cl-extra help-mode cl-macs gv
ert find-func e= woc easymenu debug cl-loaddefs pcase cl-lib time-date
mule-util tooltip = eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-wi= n term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated= -list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar r= fn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facem= enu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietna= mese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew g= reek romanian slovak czech
european ethiopic indian cyrillic chinese cha= rscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer = cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-= properties overlay
sha1 md5 base64 format env code-pages mule custom wid= get
hashtable-print-readable backquote cocoa ns multi-tty
make-networ= k-process emacs)

Memory information:
((conses 16 89635 5963)
= =C2=A0(symbols 48 19436 0)
=C2=A0(miscs 40 78 159)
=C2=A0(strings 32 = 15385 4052)
=C2=A0(string-bytes 1 463936)
=C2=A0(vectors 16 12257)=C2=A0(vector-slots 8 415700 5035)
=C2=A0(floats 8 162 183)
=C2=A0(i= ntervals 56 271 6)
=C2=A0(buffers 976 14))
--001a11431b66164c7205225d362a--