diff options
| author | Stefan Monnier | 2012-04-28 16:04:34 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-04-28 16:04:34 -0400 |
| commit | 461ef3c5186ce4df67039615b30b84b0c86d7da4 (patch) | |
| tree | f9289104750859b0cac0d58fad43284833ebbbc4 | |
| parent | d1d2e2e86be31c26bfa158b8c15c1aa5e2e776a2 (diff) | |
| download | emacs-461ef3c5186ce4df67039615b30b84b0c86d7da4.tar.gz emacs-461ef3c5186ce4df67039615b30b84b0c86d7da4.zip | |
Add some shell indentation test cases.
* test/indent/shell.sh:
* test/indent/shell.rc: Add some test cases.
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rwxr-xr-x | test/indent/shell.rc | 9 | ||||
| -rwxr-xr-x | test/indent/shell.sh | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index ff38a8fa9e1..0f3db27f188 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * indent/shell.sh: | ||
| 4 | * indent/shell.rc: Ad some test cases. | ||
| 5 | |||
| 1 | 2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * indent/ruby.rb: New file, to test new syntax-propertize code. | 8 | * indent/ruby.rb: New file, to test new syntax-propertize code. |
diff --git a/test/indent/shell.rc b/test/indent/shell.rc index 841223555b9..e5c63e335b9 100755 --- a/test/indent/shell.rc +++ b/test/indent/shell.rc | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | #!/bin/rc | 1 | #!/bin/rc |
| 2 | 2 | ||
| 3 | if (foo) { | 3 | if (foo) { |
| 4 | echo 1 | 4 | echo 1 \ |
| 5 | toto \ | ||
| 6 | tutu | ||
| 7 | titi | ||
| 5 | } | 8 | } |
| 6 | if not { | 9 | if not { |
| 7 | echo 2 | 10 | echo 2 |
| @@ -23,6 +26,10 @@ switch ($a) { | |||
| 23 | for (i in a b c) | 26 | for (i in a b c) |
| 24 | echo "$i" # KNOWN INDENT BUG | 27 | echo "$i" # KNOWN INDENT BUG |
| 25 | echo titi | 28 | echo titi |
| 29 | if (foo) | ||
| 30 | echo 3 # KNOWN INDENT BUG | ||
| 31 | if not | ||
| 32 | echo 4 # KNOWN INDENT BUG | ||
| 26 | 33 | ||
| 27 | case * | 34 | case * |
| 28 | echo other | 35 | echo other |
diff --git a/test/indent/shell.sh b/test/indent/shell.sh index 89f47d0bfe3..26a01dc3bda 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh | |||
| @@ -13,6 +13,7 @@ foo () { | |||
| 13 | case toto | 13 | case toto |
| 14 | in a) hello # KNOWN INDENT BUG | 14 | in a) hello # KNOWN INDENT BUG |
| 15 | ;; b) hi # KNOWN INDENT BUG | 15 | ;; b) hi # KNOWN INDENT BUG |
| 16 | ;; c) hi # KNOWN INDENT BUG | ||
| 16 | esac | 17 | esac |
| 17 | 18 | ||
| 18 | case $toto in | 19 | case $toto in |
| @@ -34,7 +35,8 @@ foo () { | |||
| 34 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | 35 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 35 | ;; | 36 | ;; |
| 36 | esac | | 37 | esac | |
| 37 | cat # KNOWN INDENT BUG | 38 | grep '.' | # KNOWN INDENT BUG |
| 39 | sed 1d | ||
| 38 | 40 | ||
| 39 | case toto in | 41 | case toto in |
| 40 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | 42 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |