]> git.eshelyaron.com Git - emacs.git/commitdiff
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 ff38a8fa9e135a46db6c6c211eaf84ccc0feb6ad..0f3db27f188d35b2c6ecb2b0eee9e61942026547 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 841223555b94fdcab528ffddf49dd5f99b261a12..e5c63e335b9c3f22913d718fdd44e40cd28d31fc 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 89f47d0bfe35971d9d449de9156a7b58811e30d2..26a01dc3bda39f90876449a2b8a8be50ac52a136 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=* \