emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple lisp-tests.el and commit privs


From: Stefan Monnier
Subject: Re: Simple lisp-tests.el and commit privs
Date: Tue, 20 Aug 2013 16:54:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]