changeset 111207:a8b7e7d8b686

* test/indent/octave.m: Add a test to ensure indentation is local.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 27 Oct 2010 10:48:05 -0400
parents 56f4300fbd9f
children 7608f4a2422d
files test/ChangeLog test/indent/octave.m
diffstat 2 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/test/ChangeLog	Wed Oct 27 10:31:44 2010 -0400
+++ b/test/ChangeLog	Wed Oct 27 10:48:05 2010 -0400
@@ -1,8 +1,12 @@
+2010-10-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* indent/octave.m: Add a test to ensure indentation is local.
+
 2010-10-23  Glenn Morris  <rgm@gnu.org>
 
 	* 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  <monnier@iro.umontreal.ca>
 
--- a/test/indent/octave.m	Wed Oct 27 10:31:44 2010 -0400
+++ b/test/indent/octave.m	Wed Oct 27 10:48:05 2010 -0400
@@ -17,15 +17,21 @@
   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)(:);
+    ## 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)(:);
 
-  res = [yrs, cnty, pop, bir, dth, imig, dmig, gq];
+    yrs = repmat(2000:2009, 39, 1)(:);
+
+    res = [yrs, cnty, pop, bir, dth, imig, dmig, gq];
 
 endfunction