Closed russel closed 7 years ago
I suspect the problem is that your test depends on the value of indent-tabs-mode
. Looking at the message on Travis:
Test test-for-issue-56 condition:
(ert-test-failed
...
:value nil :explanation
(arrays-of-different-length 106 155 "class foo {
def bar() {
def a = 1
def b = a +
1
def c =
1
def d = a
.baz()
}
}
" "class foo {
def bar() {
def a = 1
def b = a +
1
def c =
1
def d = a
.baz()
}
}
" first-mismatch-at 28)))
F..
Ran 9 tests in 0.034 seconds
1 unexpected results:
FAILED test-for-issue-56
Note how the two versions look identical, but Emacs reports the strings having different lengths.
I think your test should work as expected if you use should-indent
. See also 55d337f124aa0b38d0b92e84fc1b41b6012f38bf.
@russel I don't think there are any bugs here, just a test that's sensitive to tab settings. We haven't resolved all the indentation issues in #61, but I don't think there are any additional issues in this PR.
Happy to reopen if you disagree.
I guess then this test needs running twice, once with tabs set to four space and once with tabs set to tab. I guess the question is how to enforce the tab setting?
It is not yet clear what and why.
Issue #66 relates to this.