emacs/test/manual/indent/shell.sh
John Wiegley c7bef6a4f0 Merge from origin/emacs-25
1f6898d test/automated/vc-hg.el: Support out-of-tree build
3adb56e Minor change in tramp-tests.el
2b535ba ; * etc/NEWS: Update the js.el entry.
76b518c * etc/HELLO: Add Armenian and Mongolian greetings.
b51f1ef Java Mode: Fontify identifiers in the presence of annotations.
36b9539 Avoid an infloop when we run out of memory
2006752 Avoid unnecessary failures of auto-saving after fatal error
eef6784 Simplify HAVE_MODULES use in mark_maybe_pointer
552694a Revert attempt to use 'noexcept' in typedef
6ad0d39 Update documentation of 'indirect-function'
c6a5314 ; * etc/NEWS: Move entry of 'inhibit-point-motion-hooks'.
303141a Update documentation for obsoleting 'syntax-begin-function'
4e6f61c ; * etc/NEWS: Mark documented and not-to-be-documented entries.
e667bbb Document new features if Eshell
9c4e4e0 ; * etc/NEWS: Update EUDC entries.
1089dc9 Handle too long commands in Tramp
684eb58 * .gitattributes: *.cur and *.pif are binary files too.
d2c7fda * src/alloc.c (mark_maybe_pointer): HAVE_MODULES may be undefined
bd3f53d * sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
09b2b8a * src/alloc.c (mark_maybe_pointer): Also check wide-int's emacs_value
cca0f93 ; Account for spaces before the filename
c71e1e8 Use short date for 'hg annotate', and output the author
f50027b Spelling fix
c7dff67 ; * etc/NEWS: Fix the Xref entries that got separated.
cc140bc Document user-level functions in project.el
f8208b6 Document the user-level features of the Xref package
b131fb8 * loading.texi: Add `define-type' entry for load-history
db3c2a8 Improve doc strings and prompts in xref.el
f6117ef Allow the use of `font-lock-extend-region-multiline' in CC Mode.
90fd798 Fix coding system for Tramp on OS X.
e985a0e ; * etc/NEWS: Mark the 'check-expensive' entry not to be documented.
9dfcbf0 Update 'load-history' docs
207e191 Fix (error ...) error
457738f Correctly analyze brace arguments in templated C++ function declarations.
d57724a * lisp/cedet/mode-local.el (describe-function-orig-buffer): Declare.
2a9532d * lisp/ffap.el (ffap-latex-mode): Avoid free variable.
1a6b084 * lisp/play/dunnet.el (dun-fix-screen): Avoid `end-of-buffer`.
8be046f Respect fontification region calculated by major mode.  Fixes bug #22316.
4b37cba Improve documentation of Delete Selection mode
a034dd3 Fix two project-find-file issues
30abf29 Clarify doc string of 'dired-current-directory'
e990bb2 Use the face of preceding text for displaying the ellipsis
5810ac3 Suppress Chinese file name test for OSX in tramp-tests.el
eeb710a ; * lisp/startup.el: Sentences end with two spaces.
428b3de * admin/admin.el (set-version): Also handle the NEWS file.
648de81 ; Add NEWS entry for project.el
671862f apropos-library: Skip obvious duplicates; don't error on generics
51668a5 ; Grammar fix
ed41d11 Add project-find-file and project-or-external-find-file
056da45 ; Improve commentary in 'setup_for_ellipsis'
269d008 ; Improve docstring for `inhibit-startup-echo-area-message'
2016-01-11 22:51:27 -08:00

183 lines
3.6 KiB
Bash
Executable file

#!/bin/sh
# -*- eval: (bug-reference-mode 1) -*-
setlock -n /tmp/getmail.lock && echo getmail isn\'t running
toto=$(grep hello foo |
wc)
# adsgsdg
if foo; then
if bar; then
toto
fi
fi # bug#15613
case $X in
foo)
do_something
;;
arg=*) # bug#12953
do_something_else_based_on_arg
;;
*)
default
;;
esac
{ # bug#17621
foo1 &&
foo2 &&
bar
foo1 && \
foo2 && \
bar
}
for foo in bar; do # bug#17721
[ -e $foo ] && {
echo t
} && {
echo r
}
done
for foo in bar; do # bug#17896
[ -e $foo ] && [ -e $bar ] && {
echo just fine thanks
}
done
filter_3 () # bug#17842
{
tr -d '"`' | tr ' ' ' ' | \
awk -F\; -f filter.awk | \
grep -v "^," | sort -t, -k2,2
}
foo | bar | {
toto
}
grep -e "^$userregexp:" /etc/passwd | cut -d : -f 1 | while read user ; do
print -u2 "user=$user" # bug#18031
sudo -U $user -ll | while read line ; do
:
done
done
echo -n $(( 5 << 2 ))
# This should not be treated as a heredoc (bug#12770).
2
foo='bar<<' # bug#11263
echo ${foo%<<aa} # bug#11263
echo $((1<<8)) # bug#11263
echo $[1<<8] # bug#11263
declare -a VERSION
for i in $(ls "$PREFIX/sbin") ; do
echo -e $N')' $i
VERSION[${#VERSION[*]}]=$i # bug#11946.
N=$(($N + 1))
done
foo () {
bar () {
blilbi
}
case toto
in a) hello # KNOWN INDENT BUG
;; b) hi # KNOWN INDENT BUG
;; c) hi # KNOWN INDENT BUG
esac
case $toto in
a) echo 1;; b) echo 2;;
(c)
echo 3;;
d)
echo 3;;
esac
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p"
;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add
# quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
grep '.' | # KNOWN INDENT BUG
sed 1d
case toto in
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
5)
hello ;;
3) hello $(adfad)
echo esac ;; # KNOWN INDENT BUG
5) hello ;;
4) hello ;&
4) hello ;;&
5) hello ;;
5) hello ;;
esac
echo "'" wfgfe
#!/bin/bash
cat << EOF \
| cat sadfsafd \
sadfsafd "KNOWN INDENT BUG" \
| tee -a bug.txt
asdfsaf
This is a test case for a bug in bash shell mode text highlighting
EOF
cat <<EOF1 <<EOF2 # KNOWN INDENT BUG
help1
EOF1
help2
EOF2
}
bar () {
if [ $# -eq 0 ]; then
while
f # KNOWN INDENT BUG
do
bla;
done
echo "Highlighting is screwed up now"
if [ 1 = 1 ]; then
# adsgsdg
echo "screwed up"
fi
$@ $? $#
for f in *
do
sdfg
done
if swrgfef
then blas
else sdf
fi
fi
}