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