|
From: | Dmitry Gutov |
Subject: | Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112522: * lisp/progmodes/ruby-mode.el: First cut at SMIE support. |
Date: | Thu, 23 May 2013 05:59:00 +0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
On 23.05.2013 5:24, Stefan Monnier wrote:
Having ruby.rb indented according to the default settings and test any alternative settings via ERT sounds fine, except we now have two indentation engines, after all, and ideally we'd like to test all indentation cases in both of them, automatically.No, there is only one correct indentation and both engines should find it.
I just meant it would be nice to automatically test the whole of ruby.rb with both ruby-use-smie on and off. With otherwise default settings.
Also only one engine is important at any given time (if/when the SMIE code becomes good enough, it will make the other one obsolete).
Ah, okay. If you think testing the non-important engine is not important, I'm not going to argue.
For bonus points, we could delineate test.rb with comments in some special way, so that we can have multiple tests "coexist" in it (by being able to refer and test just one part).FWIW, the need for such things will largely depend on how configurable the indentation is. For cc-mode's hellish configurability there's probably a need for something serious, but for most modes I didn't find much need for such details. In many other cases you can get away with just setting the indentation vars to "unusual values" in the file-local vars so that it's obvious enough whether that value is obeyed.
So, you prefer the multi-file approach over delineating the one file? I think they're more or less equivalent, only you're forced to have more files open when debugging.
By "cases", I mean just different situations here, not different indentation settings. Like currently, we have a bunch of separate `ruby-should-indent-buffer' automated tests, ported from the Ruby repository.
If I were to make a blunder in the code that breaks, say, all of them, seeing separate diffs for each case should be easier to comprehend than the big summary diff for one big file. Naming tests helps, too.
[Prev in Thread] | Current Thread | [Next in Thread] |