diff test/indent/octave.m @ 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 8a3552ec7934
children
line wrap: on
line diff
--- 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