diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-09 13:59:55 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-09 13:59:55 -0500 |
commit | ccded26c1e57045a8941dd69b2566ac9a49cfe4b (patch) | |
tree | 3d44fbef168b0f826a035dc7db88902b68c1b3b7 /test | |
parent | 33cd3ee46b26307e4f0ccd2a622a736e05041a25 (diff) | |
download | emacs-ccded26c1e57045a8941dd69b2566ac9a49cfe4b.tar.gz |
* lisp/progmodes/sh-script.el (sh-font-lock-open-heredoc): Fix case
of here-doc that immediately follows a comment.
* .bzrignore: Ignore globals.h and related stamp.
* test/indent/shell.sh:
* test/indent/shell.rc: New files.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rwxr-xr-x | test/indent/shell.rc | 30 | ||||
-rwxr-xr-x | test/indent/shell.sh | 98 |
3 files changed, 133 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index f555878cb49..3f2dbec1e55 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2011-02-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * indent/shell.sh: + * indent/shell.rc: New files. + 2011-01-27 Chong Yidong <cyd@stupidchicken.com> * automated/font-parse-tests.el: Move from diff --git a/test/indent/shell.rc b/test/indent/shell.rc new file mode 100755 index 00000000000..841223555b9 --- /dev/null +++ b/test/indent/shell.rc @@ -0,0 +1,30 @@ +#!/bin/rc + +if (foo) { + echo 1 +} +if not { + echo 2 +} + +if (foo) + echo 3 # KNOWN INDENT BUG +if not + echo 4 # KNOWN INDENT BUG + +switch ($a) { + case 3 + echo 4 + case 5 + echo 7 + for (i in a b c) { + echo $i + } + for (i in a b c) + echo "$i" # KNOWN INDENT BUG + echo titi + + case * + echo other +} + diff --git a/test/indent/shell.sh b/test/indent/shell.sh new file mode 100755 index 00000000000..89f47d0bfe3 --- /dev/null +++ b/test/indent/shell.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +setlock -n /tmp/getmail.lock && echo getmail isn\'t running + +# adsgsdg + +foo () { + + bar () { + blilbi + } + + case toto + in a) hello # KNOWN INDENT BUG + ;; b) hi # KNOWN INDENT BUG + esac + + case $toto in + a) echo 1;; b) echo 2;; + c) echo 3;; + esac + + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add + # quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + cat # KNOWN INDENT BUG + + case toto in + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + 5) + hello ;; + 3) hello $(adfad) + echo esac ;; # KNOWN INDENT BUG + 5) hello ;; + 4) hello ;& + 4) hello ;;& + 5) hello ;; + 5) hello ;; + esac + + echo "'" wfgfe + + #!/bin/bash + cat << EOF \ + | cat sadfsafd \ + sadfsafd "KNOWN INDENT BUG" \ + | tee -a bug.txt +asdfsaf +This is a test case for a bug in bash shell mode text highlighting +EOF + + cat <<EOF1 <<EOF2 # KNOWN INDENT BUG +help1 +EOF1 +help2 +EOF2 +} +bar () { + if [ $# == 0 ]; then + while + f # KNOWN INDENT BUG + do + bla; + done + echo "Highlighting is screwed up now" + if [ 1 = 1 ]; then + # adsgsdg + echo "screwed up" + fi + + $@ $? $# + + for f in * + do + sdfg + done + + if swrgfef + then blas + else sdf + fi + + fi +} |