unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Barry OReilly <gundaetiapo@gmail.com>
Cc: Dmitry Gutov <dgutov@yandex.ru>, emacs-devel@gnu.org
Subject: Re: Simple lisp-tests.el and commit privs
Date: Tue, 20 Aug 2013 16:54:49 -0400	[thread overview]
Message-ID: <jwvfvu49jgn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAFM41H3hoEGsX5CHhfuTSakqmxDLqxu0Bhc3OvmTdbyUPQJ1CA@mail.gmail.com> (Barry OReilly's message of "Tue, 20 Aug 2013 12:04:15 -0400")

> 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

I don't see what's the problem here: if indent/ruby.rb contains:

  if a == 2
    puts "hello"
  else
    puts "there"
    puts "there"
  end

then presumably the bug would get caught.  You may have to run the test
by first flushing all the code to the left margin before reindenting,
but if reindentation works correctly both when started "at left-margin"
and when started "at the correct indentation", then there's a very high
probability that it will work in most/all other cases as well.

Do you know of bugs that have occurred and that wouldn't be caught this 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?

I still don't see what problem this is trying to address.


        Stefan



  reply	other threads:[~2013-08-20 20:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21  4:12 Simple lisp-tests.el and commit privs Barry OReilly
2013-07-21 23:08 ` Xue Fuqiao
2013-07-25 19:09 ` Stefan Monnier
2013-08-14 17:49   ` Barry OReilly
2013-08-14 21:23     ` Dmitry Gutov
2013-08-18 22:05       ` Barry OReilly
2013-08-19  3:06         ` Stefan Monnier
2013-08-19  3:09         ` Stefan Monnier
2013-08-19 16:41           ` Barry OReilly
2013-08-20  5:23             ` Stefan Monnier
2013-08-20 16:04               ` Barry OReilly
2013-08-20 20:54                 ` Stefan Monnier [this message]
2013-08-21 23:06                   ` Barry OReilly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfvu49jgn.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=gundaetiapo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).