Merge from emacs-23; up to 2010-06-11T14:39:54Z!cyd@stupidchicken.com.
[bpt/emacs.git] / test / indent / shell.sh
1 #!/bin/sh
2
3 setlock -n /tmp/getmail.lock && echo getmail isn\'t running
4
5 # adsgsdg
6
7 foo () {
8
9 bar () {
10 blilbi
11 }
12
13 case toto
14 in a) hello # KNOWN INDENT BUG
15 ;; b) hi # KNOWN INDENT BUG
16 esac
17
18 case $toto in
19 a) echo 1;; b) echo 2;;
20 c) echo 3;;
21 esac
22
23 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24 *${as_nl}ac_space=\ *)
25 # `set' does not quote correctly, so add quotes: double-quote
26 # substitution turns \\\\ into \\, and sed turns \\ into \.
27 sed -n \
28 "s/'/'\\\\''/g;
29 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p"
30 ;; #(
31 *)
32 # `set' quotes correctly as required by POSIX, so do not add
33 # quotes.
34 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
35 ;;
36 esac |
37 cat # KNOWN INDENT BUG
38
39 case toto in
40 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
41 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \
42 | --exec=* | --exe=* | --ex=*)
43 exec_prefix=$ac_optarg ;;
44 5)
45 hello ;;
46 3) hello $(adfad)
47 echo esac ;; # KNOWN INDENT BUG
48 5) hello ;;
49 4) hello ;&
50 4) hello ;;&
51 5) hello ;;
52 5) hello ;;
53 esac
54
55 echo "'" wfgfe
56
57 #!/bin/bash
58 cat << EOF \
59 | cat sadfsafd \
60 sadfsafd "KNOWN INDENT BUG" \
61 | tee -a bug.txt
62 asdfsaf
63 This is a test case for a bug in bash shell mode text highlighting
64 EOF
65
66 cat <<EOF1 <<EOF2 # KNOWN INDENT BUG
67 help1
68 EOF1
69 help2
70 EOF2
71 }
72 bar () {
73 if [ $# == 0 ]; then
74 while
75 f # KNOWN INDENT BUG
76 do
77 bla;
78 done
79 echo "Highlighting is screwed up now"
80 if [ 1 = 1 ]; then
81 # adsgsdg
82 echo "screwed up"
83 fi
84
85 $@ $? $#
86
87 for f in *
88 do
89 sdfg
90 done
91
92 if swrgfef
93 then blas
94 else sdf
95 fi
96
97 fi
98 }