Add some shell indentation test cases.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Apr 2012 20:04:34 +0000 (16:04 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 28 Apr 2012 20:04:34 +0000 (16:04 -0400)
* test/indent/shell.sh:
* test/indent/shell.rc: Add some test cases.

test/ChangeLog
test/indent/shell.rc
test/indent/shell.sh

index ff38a8f..0f3db27 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * indent/shell.sh:
+       * indent/shell.rc: Ad some test cases.
+
 2012-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * indent/ruby.rb: New file, to test new syntax-propertize code.
index 8412235..e5c63e3 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/rc
 
 if (foo) {
-    echo 1
+    echo 1 \
+         toto \
+         tutu
+    titi
 }
 if not {
     echo 2
@@ -23,6 +26,10 @@ switch ($a) {
         for (i in a b c)
             echo "$i"           # KNOWN INDENT BUG
         echo titi
+        if (foo)
+            echo 3             # KNOWN INDENT BUG
+        if not
+            echo 4             # KNOWN INDENT BUG
 
     case *
        echo other
index 89f47d0..26a01dc 100755 (executable)
@@ -13,6 +13,7 @@ foo () {
     case toto
     in a) hello                 # KNOWN INDENT BUG
     ;; b) hi                    # KNOWN INDENT BUG
+    ;; c) hi                    # KNOWN INDENT BUG
     esac
 
     case $toto in
@@ -34,7 +35,8 @@ foo () {
             sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
             ;;
     esac |
-        cat                     # KNOWN INDENT BUG
+        grep '.' |              # KNOWN INDENT BUG
+        sed 1d
     
     case toto in
         -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \