diff options
| author | Bill Wohler | 2012-11-24 19:43:02 -0800 |
|---|---|---|
| committer | Bill Wohler | 2012-11-24 19:43:02 -0800 |
| commit | 5244bc019bf7376caff3bb198ff674e0ad9fb0e6 (patch) | |
| tree | 02ee1615e904771f692ec2957c79a08ae029a13d /test/indent | |
| parent | 9f7e719509474e92f85955e22e57ffeebd4e96f3 (diff) | |
| parent | c07a6ded1df2f4156badc9add2953579622c3722 (diff) | |
| download | emacs-5244bc019bf7376caff3bb198ff674e0ad9fb0e6.tar.gz emacs-5244bc019bf7376caff3bb198ff674e0ad9fb0e6.zip | |
Merge from trunk.
Diffstat (limited to 'test/indent')
| -rw-r--r-- | test/indent/latex-mode.tex | 11 | ||||
| -rwxr-xr-x | test/indent/perl.perl | 5 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 27 | ||||
| -rwxr-xr-x | test/indent/shell.rc | 9 | ||||
| -rwxr-xr-x | test/indent/shell.sh | 26 |
5 files changed, 75 insertions, 3 deletions
diff --git a/test/indent/latex-mode.tex b/test/indent/latex-mode.tex new file mode 100644 index 00000000000..55c8e7033bd --- /dev/null +++ b/test/indent/latex-mode.tex | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | \documentclass{article} % -*- eval: (bug-reference-mode 1) -*- | ||
| 2 | |||
| 3 | \usepackage[utf8]{inputenc} | ||
| 4 | |||
| 5 | \begin{document} | ||
| 6 | |||
| 7 | To fix this, remove the \url{sn9c102.ko} from where it appears in | ||
| 8 | \url{/lib/modules/$(uname -r)}, %bug#11953. | ||
| 9 | and install the appropriate \url{gspca-modules} package. | ||
| 10 | |||
| 11 | \end{document} | ||
diff --git a/test/indent/perl.perl b/test/indent/perl.perl new file mode 100755 index 00000000000..2411c96a5e4 --- /dev/null +++ b/test/indent/perl.perl | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | # -*- eval: (bug-reference-mode 1) -*- | ||
| 3 | |||
| 4 | $fileType_filesButNot # bug#12373? | ||
| 5 | = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} ); | ||
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb new file mode 100644 index 00000000000..4f2e9e63377 --- /dev/null +++ b/test/indent/ruby.rb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # Percent literals. | ||
| 2 | b = %Q{This is a "string"} | ||
| 3 | c = %w!foo | ||
| 4 | bar | ||
| 5 | baz! | ||
| 6 | d = %(hello (nested) world) | ||
| 7 | |||
| 8 | # Don't propertize percent literals inside strings. | ||
| 9 | "(%s, %s)" % [123, 456] | ||
| 10 | |||
| 11 | # Or inside comments. | ||
| 12 | x = # "tot %q/to"; = | ||
| 13 | y = 2 / 3 | ||
| 14 | |||
| 15 | # Regexp after whitelisted method. | ||
| 16 | "abc".sub /b/, 'd' | ||
| 17 | |||
| 18 | # Don't mis-match "sub" at the end of words. | ||
| 19 | a = asub / aslb + bsub / bslb; | ||
| 20 | |||
| 21 | # Highlight the regexp after "if". | ||
| 22 | x = toto / foo if /do bar/ =~ "dobar" | ||
| 23 | |||
| 24 | # Some Cucumber code: | ||
| 25 | Given /toto/ do | ||
| 26 | print "hello" | ||
| 27 | end | ||
diff --git a/test/indent/shell.rc b/test/indent/shell.rc index 841223555b9..e5c63e335b9 100755 --- a/test/indent/shell.rc +++ b/test/indent/shell.rc | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | #!/bin/rc | 1 | #!/bin/rc |
| 2 | 2 | ||
| 3 | if (foo) { | 3 | if (foo) { |
| 4 | echo 1 | 4 | echo 1 \ |
| 5 | toto \ | ||
| 6 | tutu | ||
| 7 | titi | ||
| 5 | } | 8 | } |
| 6 | if not { | 9 | if not { |
| 7 | echo 2 | 10 | echo 2 |
| @@ -23,6 +26,10 @@ switch ($a) { | |||
| 23 | for (i in a b c) | 26 | for (i in a b c) |
| 24 | echo "$i" # KNOWN INDENT BUG | 27 | echo "$i" # KNOWN INDENT BUG |
| 25 | echo titi | 28 | echo titi |
| 29 | if (foo) | ||
| 30 | echo 3 # KNOWN INDENT BUG | ||
| 31 | if not | ||
| 32 | echo 4 # KNOWN INDENT BUG | ||
| 26 | 33 | ||
| 27 | case * | 34 | case * |
| 28 | echo other | 35 | echo other |
diff --git a/test/indent/shell.sh b/test/indent/shell.sh index 89f47d0bfe3..6f3447c3aa9 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh | |||
| @@ -1,9 +1,26 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # -*- eval: (bug-reference-mode 1) -*- | ||
| 2 | 3 | ||
| 3 | setlock -n /tmp/getmail.lock && echo getmail isn\'t running | 4 | setlock -n /tmp/getmail.lock && echo getmail isn\'t running |
| 4 | 5 | ||
| 5 | # adsgsdg | 6 | # adsgsdg |
| 6 | 7 | ||
| 8 | echo -n $(( 5 << 2 )) | ||
| 9 | # This should not be treated as a heredoc (bug#12770). | ||
| 10 | 2 | ||
| 11 | |||
| 12 | foo='bar<<' # bug#11263 | ||
| 13 | echo ${foo%<<aa} # bug#11263 | ||
| 14 | echo $((1<<8)) # bug#11263 | ||
| 15 | echo $[1<<8] # bug#11263 | ||
| 16 | |||
| 17 | declare -a VERSION | ||
| 18 | for i in $(ls "$PREFIX/sbin") ; do | ||
| 19 | echo -e $N')' $i | ||
| 20 | VERSION[${#VERSION[*]}]=$i #bug#11946. | ||
| 21 | N=$(($N + 1)) | ||
| 22 | done | ||
| 23 | |||
| 7 | foo () { | 24 | foo () { |
| 8 | 25 | ||
| 9 | bar () { | 26 | bar () { |
| @@ -13,11 +30,15 @@ foo () { | |||
| 13 | case toto | 30 | case toto |
| 14 | in a) hello # KNOWN INDENT BUG | 31 | in a) hello # KNOWN INDENT BUG |
| 15 | ;; b) hi # KNOWN INDENT BUG | 32 | ;; b) hi # KNOWN INDENT BUG |
| 33 | ;; c) hi # KNOWN INDENT BUG | ||
| 16 | esac | 34 | esac |
| 17 | 35 | ||
| 18 | case $toto in | 36 | case $toto in |
| 19 | a) echo 1;; b) echo 2;; | 37 | a) echo 1;; b) echo 2;; |
| 20 | c) echo 3;; | 38 | (c) |
| 39 | echo 3;; | ||
| 40 | d) | ||
| 41 | echo 3;; | ||
| 21 | esac | 42 | esac |
| 22 | 43 | ||
| 23 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | 44 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
| @@ -34,7 +55,8 @@ foo () { | |||
| 34 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | 55 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 35 | ;; | 56 | ;; |
| 36 | esac | | 57 | esac | |
| 37 | cat # KNOWN INDENT BUG | 58 | grep '.' | # KNOWN INDENT BUG |
| 59 | sed 1d | ||
| 38 | 60 | ||
| 39 | case toto in | 61 | case toto in |
| 40 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | 62 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |