From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.devel Subject: Re: Simple lisp-tests.el and commit privs Date: Tue, 20 Aug 2013 12:04:15 -0400 Message-ID: References: <87y584c6gv.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d0a186d29a004e46335b3 X-Trace: ger.gmane.org 1377014662 13256 80.91.229.3 (20 Aug 2013 16:04:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Aug 2013 16:04:22 +0000 (UTC) Cc: Dmitry Gutov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 20 18:04:24 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VBoPw-0000ys-D3 for ged-emacs-devel@m.gmane.org; Tue, 20 Aug 2013 18:04:24 +0200 Original-Received: from localhost ([::1]:48814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBoPv-0003Dy-VF for ged-emacs-devel@m.gmane.org; Tue, 20 Aug 2013 12:04:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBoPq-0003CK-Pa for emacs-devel@gnu.org; Tue, 20 Aug 2013 12:04:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBoPp-0008Rg-7C for emacs-devel@gnu.org; Tue, 20 Aug 2013 12:04:18 -0400 Original-Received: from mail-oa0-x233.google.com ([2607:f8b0:4003:c02::233]:59616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBoPp-0008RO-1y for emacs-devel@gnu.org; Tue, 20 Aug 2013 12:04:17 -0400 Original-Received: by mail-oa0-f51.google.com with SMTP id h1so1115189oag.24 for ; Tue, 20 Aug 2013 09:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AM6oGphc6xW5y2/zUJ9B+eMGez31l3vZ1siLEoy9gLk=; b=zaJY2E5tBp9pITdVm9ImBZB7SAk15ksDGjWhMs44GaoD5LCTNQjyJ0FyZtOS0kb++z zFp6RkPJOoYL3pSnPRaaPig26OZ8ACwalqE0IFYMhMMo3nYrY/3NNQbNb+6AU93wUu0H /FGtG+ieo1YrEauZqdFGMikXom2dxF2oOSsun2nd+DjFPy7kk5mcTfLx9COkhctRG5v8 C33ompxydqE2DPnglQT7P4Xi31pRzPQWbTWCgZdYl+leI/lU/9pJ4ec0UsLh0txSa2G+ IIJALJvB3zyfbKOWDMG++AUWiUFLxhro3nUhdh3bWEOqE88pEDsMkb+kHx07QxlFFV+C vJZA== X-Received: by 10.60.35.40 with SMTP id e8mr2516310oej.34.1377014656082; Tue, 20 Aug 2013 09:04:16 -0700 (PDT) Original-Received: by 10.76.89.194 with HTTP; Tue, 20 Aug 2013 09:04:15 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162928 Archived-At: --089e013d0a186d29a004e46335b3 Content-Type: text/plain; charset=ISO-8859-1 > Oh, you're referring to known indentation problems, where you want > to have the test but have it be marked as "expected". Not just that. Suppose ruby.rb contains: if a == 2 puts "hello" else puts "there" end so as we can test general indentation which changes the buffer. Expected success (current behavior): --- ruby.rb 2013-08-20 11:29:39.000000000 -0400 +++ ruby.rb.new 2013-08-20 11:29:42.000000000 -0400 @@ -35,8 +35,8 @@ if a == 2 puts "hello" - else - puts "there" + else + puts "there" end if a == 2 then Unexpected failure (if "else" didn't move -- is not current behavior): if a == 2 puts "hello" else - puts "there" + puts "there" end if a == 2 then Expected failure (current behavior) @@ -52,11 +52,11 @@ case a when "a" 6 - # Support for this syntax was removed in Ruby 1.9, so we - # probably don't need to handle it either. - # when "b" : - # 7 - # when "c" : 2 + # Support for this syntax was removed in Ruby 1.9, so we + # probably don't need to handle it either. + # when "b" : + # 7 + # when "c" : 2 when "d" then 4 else 5 end ERT has a means of distinguishing these. However, if we lump all these in one test/indent/ruby.rb file and do as 'make ruby.rb.test' from one ERT test, then these aren't distinguishable (in a simple way). > Why not have a ert-with-temp-buffer which if the test fails (within > the form), a file would be saved off with the buffer contents. > Ideally the test case name would be in the generated filename. Is this inadequate to address your debugging needs? --089e013d0a186d29a004e46335b3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> Oh, you're referring to known indentation problem= s, where you want
> to have the test but have it be marked as "e= xpected".

Not just that. Suppose ruby.rb contains:

=A0 i= f a =3D=3D 2
=A0=A0=A0 puts "hello"
=A0=A0=A0 else
=A0 puts "there&= quot;
=A0 end

so as we can test general indentation which changes= the buffer.

Expected success (current behavior):

--- ruby.rb= =A0=A0=A0=A0 2013-08-20 11:29:39.000000000 -0400
+++ ruby.rb.new 2013-08-20 11:29:42.000000000 -0400
@@ -35,8 +35,8 @@=A0
=A0=A0 if a =3D=3D 2
=A0=A0=A0=A0 puts "hello"
-=A0= =A0=A0 else
-=A0 puts "there"
+=A0 else
+=A0=A0=A0 puts = "there"
=A0=A0 end
=A0
=A0=A0 if a =3D=3D 2 then

Unexpected failure (if "else&q= uot; didn't move -- is not current behavior):

=A0=A0 if a =3D=3D= 2
=A0=A0=A0=A0 puts "hello"
=A0=A0=A0=A0 else
-=A0 puts= "there"
+=A0=A0=A0 puts "there"
=A0=A0 end
=A0
=A0=A0 if a =3D=3D 2 then

Expected failure (cur= rent behavior)

@@ -52,11 +52,11 @@
=A0=A0 case a
=A0=A0 when &= quot;a"
=A0=A0=A0=A0 6
-=A0 # Support for this syntax was remove= d in Ruby 1.9, so we
-=A0 # probably don't need to handle it either.=
-=A0 # when "b" :
-=A0 #=A0=A0 7
-=A0 # when "c" = : 2
+=A0=A0=A0 # Support for this syntax was removed in Ruby 1.9, so we<= br>+=A0=A0=A0 # probably don't need to handle it either.
+=A0=A0=A0 = # when "b" :
+=A0=A0=A0 #=A0=A0 7
+=A0=A0=A0 # when "c" : 2
=A0=A0 when = "d"=A0 then 4
=A0=A0 else 5
=A0=A0 end

ERT has a mea= ns of distinguishing these. However, if we lump all these
in one test/in= dent/ruby.rb file and do as 'make ruby.rb.test' from one
ERT test, then these aren't distinguishable (in a simple way).

&= gt; Why not have a ert-with-temp-buffer which if the test fails (within
= > the form), a file would be saved off with the buffer contents.
> Ideally the test case name would be in the generated filename.

= Is this inadequate to address your debugging needs?

--089e013d0a186d29a004e46335b3--