aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert2011-02-09 23:04:56 -0800
committerPaul Eggert2011-02-09 23:04:56 -0800
commitbe6d99804b3efdecf3660c4b51da1945e955fb4d (patch)
tree99b523c445f7b95572ab668f4e878cd703ff3527 /test
parentdd4638842ad1921562bc66049ec81a4530651cdf (diff)
parent67f02b82f496be403353a1dc918cc4f2278841bb (diff)
downloademacs-be6d99804b3efdecf3660c4b51da1945e955fb4d.tar.gz
emacs-be6d99804b3efdecf3660c4b51da1945e955fb4d.zip
Merge from mainline.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rwxr-xr-xtest/indent/shell.rc30
-rwxr-xr-xtest/indent/shell.sh98
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 @@
12011-02-09 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * indent/shell.sh:
4 * indent/shell.rc: New files.
5
12011-01-27 Chong Yidong <cyd@stupidchicken.com> 62011-01-27 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * automated/font-parse-tests.el: Move from 8 * 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 @@
1#!/bin/rc
2
3if (foo) {
4 echo 1
5}
6if not {
7 echo 2
8}
9
10if (foo)
11 echo 3 # KNOWN INDENT BUG
12if not
13 echo 4 # KNOWN INDENT BUG
14
15switch ($a) {
16 case 3
17 echo 4
18 case 5
19 echo 7
20 for (i in a b c) {
21 echo $i
22 }
23 for (i in a b c)
24 echo "$i" # KNOWN INDENT BUG
25 echo titi
26
27 case *
28 echo other
29}
30
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 @@
1#!/bin/sh
2
3setlock -n /tmp/getmail.lock && echo getmail isn\'t running
4
5# adsgsdg
6
7foo () {
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
62asdfsaf
63This is a test case for a bug in bash shell mode text highlighting
64EOF
65
66 cat <<EOF1 <<EOF2 # KNOWN INDENT BUG
67help1
68EOF1
69help2
70EOF2
71}
72bar () {
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}