A few tiny doc/ copyedits.
[emacs.git] / test / indent / shell.sh
blobe3619057d6ef09143eb46582541695bc24b58984
1 #!/bin/sh
2 # -*- eval: (bug-reference-mode 1) -*-
4 setlock -n /tmp/getmail.lock && echo getmail isn\'t running
6 # adsgsdg
8 if foo; then
9 if bar; then
10 toto
12 fi # bug#15613
14 case $X in
15 foo)
16 do_something
18 arg=*) # bug#12953
19 do_something_else_based_on_arg
22 default
24 esac
26 { # bug#17621
27 foo1 &&
28 foo2 &&
29 bar
31 foo1 && \
32 foo2 && \
33 bar
36 for foo in bar; do # bug#17721
37 [ -e $foo ] && {
38 echo t
39 } && {
40 echo r
42 done
44 for foo in bar; do # bug#17896
45 [ -e $foo ] && [ -e $bar ] && {
46 echo just fine thanks
48 done
50 filter_3 () # bug#17842
52 tr -d '"`' | tr ' ' ' ' | \
53 awk -F\; -f filter.awk | \
54 grep -v "^," | sort -t, -k2,2
57 echo -n $(( 5 << 2 ))
58 # This should not be treated as a heredoc (bug#12770).
61 foo='bar<<' # bug#11263
62 echo ${foo%<<aa} # bug#11263
63 echo $((1<<8)) # bug#11263
64 echo $[1<<8] # bug#11263
66 declare -a VERSION
67 for i in $(ls "$PREFIX/sbin") ; do
68 echo -e $N')' $i
69 VERSION[${#VERSION[*]}]=$i # bug#11946.
70 N=$(($N + 1))
71 done
73 foo () {
75 bar () {
76 blilbi
79 case toto
80 in a) hello # KNOWN INDENT BUG
81 ;; b) hi # KNOWN INDENT BUG
82 ;; c) hi # KNOWN INDENT BUG
83 esac
85 case $toto in
86 a) echo 1;; b) echo 2;;
87 (c)
88 echo 3;;
90 echo 3;;
91 esac
93 case $as_nl`(ac_space=' '; set) 2>&1` in #(
94 *${as_nl}ac_space=\ *)
95 # `set' does not quote correctly, so add quotes: double-quote
96 # substitution turns \\\\ into \\, and sed turns \\ into \.
97 sed -n \
98 "s/'/'\\\\''/g;
99 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p"
100 ;; #(
102 # `set' quotes correctly as required by POSIX, so do not add
103 # quotes.
104 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
106 esac |
107 grep '.' | # KNOWN INDENT BUG
108 sed 1d
110 case toto in
111 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
112 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \
113 | --exec=* | --exe=* | --ex=*)
114 exec_prefix=$ac_optarg ;;
116 hello ;;
117 3) hello $(adfad)
118 echo esac ;; # KNOWN INDENT BUG
119 5) hello ;;
120 4) hello ;&
121 4) hello ;;&
122 5) hello ;;
123 5) hello ;;
124 esac
126 echo "'" wfgfe
128 #!/bin/bash
129 cat << EOF \
130 | cat sadfsafd \
131 sadfsafd "KNOWN INDENT BUG" \
132 | tee -a bug.txt
133 asdfsaf
134 This is a test case for a bug in bash shell mode text highlighting
137 cat <<EOF1 <<EOF2 # KNOWN INDENT BUG
138 help1
139 EOF1
140 help2
141 EOF2
143 bar () {
144 if [ $# == 0 ]; then
145 while
146 f # KNOWN INDENT BUG
148 bla;
149 done
150 echo "Highlighting is screwed up now"
151 if [ 1 = 1 ]; then
152 # adsgsdg
153 echo "screwed up"
156 $@ $? $#
158 for f in *
160 sdfg
161 done
163 if swrgfef
164 then blas
165 else sdf