]> ocean-lang.org Git - ocean/commitdiff
indent-test: enhance the tests a bit.
authorNeilBrown <neil@brown.name>
Fri, 5 Mar 2021 08:00:52 +0000 (19:00 +1100)
committerNeilBrown <neil@brown.name>
Fri, 5 Mar 2021 08:00:52 +0000 (19:00 +1100)
In particular, test for "else" both indented and unindented.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/indent_test.mdc

index f3bd7f1517960575b2ceb71253f2647c739223ae..64ccc4345fad33added5b47b10361660fc3f0a1a 100644 (file)
@@ -260,6 +260,21 @@ $*expression
         else if cond2:
                there1 =x
                there1a=x
+       if cond + cond2 :
+               hello = x;
+               hello2 = x;
+
+               sum = val +
+                val;
+
+               if condX:
+                foo = x *
+                    x +
+                    y
+                    / two;
+       else if cond2:
+               there1 =x
+               there1a=x
        there2=x
        there3=x;
        all = y;
@@ -276,6 +291,8 @@ $*expression
        if a:
                if b:
                        c= d
+               else:
+                       f=g
        x = y
 
 # File: itest.out
@@ -283,6 +300,16 @@ $*expression
        (mister=no);
        (there=x);
        (all=y);
+       if (cond+cond2):
+           (hello=x);
+           (hello2=x);
+           (sum=(val+val));
+           if condX:
+               (foo=((x*x)+(y/two)));
+       else:
+           if cond2:
+               (there1=x);
+               (there1a=x);
        if (cond+cond2):
            (hello=x);
            (hello2=x);
@@ -314,4 +341,6 @@ $*expression
        if a:
            if b:
                (c=d);
+           else:
+               (f=g);
        (x=y);