* net/dbus.el (dbus-init-bus, dbus-call-method)
[emacs.git] / test / indent / shell.sh
blobfdf736e06bec1892622a2bb849192be3b09c1191
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 echo -n $(( 5 << 2 ))
27 # This should not be treated as a heredoc (bug#12770).
30 foo='bar<<' # bug#11263
31 echo ${foo%<<aa} # bug#11263
32 echo $((1<<8)) # bug#11263
33 echo $[1<<8] # bug#11263
35 declare -a VERSION
36 for i in $(ls "$PREFIX/sbin") ; do
37 echo -e $N')' $i
38 VERSION[${#VERSION[*]}]=$i # bug#11946.
39 N=$(($N + 1))
40 done
42 foo () {
44 bar () {
45 blilbi
48 case toto
49 in a) hello # KNOWN INDENT BUG
50 ;; b) hi # KNOWN INDENT BUG
51 ;; c) hi # KNOWN INDENT BUG
52 esac
54 case $toto in
55 a) echo 1;; b) echo 2;;
56 (c)
57 echo 3;;
59 echo 3;;
60 esac
62 case $as_nl`(ac_space=' '; set) 2>&1` in #(
63 *${as_nl}ac_space=\ *)
64 # `set' does not quote correctly, so add quotes: double-quote
65 # substitution turns \\\\ into \\, and sed turns \\ into \.
66 sed -n \
67 "s/'/'\\\\''/g;
68 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p"
69 ;; #(
71 # `set' quotes correctly as required by POSIX, so do not add
72 # quotes.
73 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
75 esac |
76 grep '.' | # KNOWN INDENT BUG
77 sed 1d
79 case toto in
80 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
81 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \
82 | --exec=* | --exe=* | --ex=*)
83 exec_prefix=$ac_optarg ;;
85 hello ;;
86 3) hello $(adfad)
87 echo esac ;; # KNOWN INDENT BUG
88 5) hello ;;
89 4) hello ;&
90 4) hello ;;&
91 5) hello ;;
92 5) hello ;;
93 esac
95 echo "'" wfgfe
97 #!/bin/bash
98 cat << EOF \
99 | cat sadfsafd \
100 sadfsafd "KNOWN INDENT BUG" \
101 | tee -a bug.txt
102 asdfsaf
103 This is a test case for a bug in bash shell mode text highlighting
106 cat <<EOF1 <<EOF2 # KNOWN INDENT BUG
107 help1
108 EOF1
109 help2
110 EOF2
112 bar () {
113 if [ $# == 0 ]; then
114 while
115 f # KNOWN INDENT BUG
117 bla;
118 done
119 echo "Highlighting is screwed up now"
120 if [ 1 = 1 ]; then
121 # adsgsdg
122 echo "screwed up"
125 $@ $? $#
127 for f in *
129 sdfg
130 done
132 if swrgfef
133 then blas
134 else sdf