We could potentially test it by calling htmlfontify-buffer.
So, there would be a reference html file everyone would have to update after
making a change in indent/ruby.rb?
Probably. Tho you could potentially change the test so it first
un-htmlizes the file, then runs font-lock, then htmlfontify, in which
case the file stored in test/indent would be the html version.
I guess that sounds more like enriched-mode than htmlfontify-buffer.
ruby-mode also has customization variables that change indentation behavior
(at least one, for now, and we should add more). How do you propose to
test that?
Indeed, that's a widespread limitation with the current system.
I suppose we could set the variables via file-local vars mechanism, but
that'll require us to have multiple files, one per combination of variables.
Yes.
Or introduce some new kind of preprocessing, say, treat the same kind of
comment in the middle of the file as an indication to stop, change the
values, and indent the part of the file below with new values applied.
We could, but then we'd lose the easy way to test&debug interactively by
simply visiting the file. ERT isn't much worse in that case (and the
two aren't mutually exclusive: use test/indent the general indentation
rules, and use ERT rules to check how indentation obeys the various
indentation variables).