From: Stefan Monnier Date: Wed, 27 Oct 2010 14:48:05 +0000 (-0400) Subject: * test/indent/octave.m: Add a test to ensure indentation is local. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d19dc73db6fc2b90ab6d058e2f4cb9c44a4aa4bc;p=emacs.git * test/indent/octave.m: Add a test to ensure indentation is local. --- diff --git a/test/ChangeLog b/test/ChangeLog index 3808012c298..5a5c202ad3c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,8 +1,12 @@ +2010-10-27 Stefan Monnier + + * indent/octave.m: Add a test to ensure indentation is local. + 2010-10-23 Glenn Morris * comint-testsuite.el - (comint-testsuite--test-comint-password-prompt-regexp): Add - "Please enter the password". (Bug#7224) + (comint-testsuite--test-comint-password-prompt-regexp): + Add "Please enter the password". (Bug#7224) 2010-09-20 Stefan Monnier diff --git a/test/indent/octave.m b/test/indent/octave.m index dc6f8448152..768f3d85e01 100644 --- a/test/indent/octave.m +++ b/test/indent/octave.m @@ -17,15 +17,21 @@ function res = tcomp (fn) cnty = repmat(x(:,1)(:), 10, 1); pop = x(:,1:10)(:); - bir = x(:,11:20)(:); - dth = x(:,21:30)(:); - imig = x(:,31:40)(:); - dmig = x(:,41:50)(:); - gq = x(:,51:60)(:); - - yrs = repmat(2000:2009, 39, 1)(:); - - res = [yrs, cnty, pop, bir, dth, imig, dmig, gq]; + ## Here and below, we test if the indentation aligns with a previous + ## fixindented line. This is important so as to make it easier for the + ## user to verride some indentation somewhere, and also because it + ## reflects the fact that the indentation decision is taken with a minimum + ## amount of work (i.e. in the present case, without having to walk back + ## until the `function' line). + bir = x(:,11:20)(:); # fixindent + dth = x(:,21:30)(:); + imig = x(:,31:40)(:); + dmig = x(:,41:50)(:); + gq = x(:,51:60)(:); + + yrs = repmat(2000:2009, 39, 1)(:); + + res = [yrs, cnty, pop, bir, dth, imig, dmig, gq]; endfunction