aboutsummaryrefslogtreecommitdiffstats
path: root/test/indent
diff options
context:
space:
mode:
authorRichard Stallman2015-04-05 08:36:56 -0400
committerRichard Stallman2015-04-05 08:42:43 -0400
commit4e23cd0ccde4ad1e14fe2870ccf140487af649b2 (patch)
treeb709ac1e92a892f6ec1faa85eb59a9e5960c25dd /test/indent
parentdca743f0941909a80e3f28c023977120b6203e20 (diff)
parent16eec6fc55dcc05d1d819f18998e84a9580b2521 (diff)
downloademacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.tar.gz
emacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.zip
* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard <pre> before armor. Ignore more kinds of whitespace in mime headers. Modify the decrypted mime part's mime type so it will be displayed by default when visiting this message again. * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc. (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix.
Diffstat (limited to 'test/indent')
-rw-r--r--test/indent/Makefile7
-rw-r--r--test/indent/js-indent-init-dynamic.js30
-rw-r--r--test/indent/js-indent-init-t.js21
-rw-r--r--test/indent/js.js15
-rw-r--r--test/indent/ruby.rb4
-rw-r--r--test/indent/sgml-mode-attribute.html14
6 files changed, 87 insertions, 4 deletions
diff --git a/test/indent/Makefile b/test/indent/Makefile
index 9e75f3dad57..83162681d72 100644
--- a/test/indent/Makefile
+++ b/test/indent/Makefile
@@ -1,14 +1,15 @@
1RM=rm 1RM=rm
2EMACS=emacs 2EMACS=../../src/emacs
3
4all: clean $(addsuffix .test,$(wildcard *.*))
3 5
4clean: 6clean:
5 -$(RM) *.test 7 -$(RM) -f *.new
6 8
7# TODO: 9# TODO:
8# - mark the places where the indentation is known to be incorrect, 10# - mark the places where the indentation is known to be incorrect,
9# and allow either ignoring those errors or not. 11# and allow either ignoring those errors or not.
10%.test: % 12%.test: %
11 -$(RM) $<.new
12 $(EMACS) --batch $< \ 13 $(EMACS) --batch $< \
13 --eval '(indent-region (point-min) (point-max) nil)' \ 14 --eval '(indent-region (point-min) (point-max) nil)' \
14 --eval '(write-region (point-min) (point-max) "$<.new")' 15 --eval '(write-region (point-min) (point-max) "$<.new")'
diff --git a/test/indent/js-indent-init-dynamic.js b/test/indent/js-indent-init-dynamic.js
new file mode 100644
index 00000000000..536a976e86e
--- /dev/null
+++ b/test/indent/js-indent-init-dynamic.js
@@ -0,0 +1,30 @@
1var foo = function() {
2 return 7;
3};
4
5var foo = function() {
6 return 7;
7 },
8 bar = 8;
9
10var foo = function() {
11 return 7;
12 },
13 bar = function() {
14 return 8;
15 };
16
17// Local Variables:
18// indent-tabs-mode: nil
19// js-indent-level: 2
20// js-indent-first-init: dynamic
21// End:
22
23// The following test intentionally produces a scan error and should
24// be placed below all other tests to prevent awkward indentation.
25// (It still thinks it's within the body of a function.)
26
27var foo = function() {
28 return 7;
29 ,
30 bar = 8;
diff --git a/test/indent/js-indent-init-t.js b/test/indent/js-indent-init-t.js
new file mode 100644
index 00000000000..bb755420ba7
--- /dev/null
+++ b/test/indent/js-indent-init-t.js
@@ -0,0 +1,21 @@
1var foo = function() {
2 return 7;
3 };
4
5var foo = function() {
6 return 7;
7 },
8 bar = 8;
9
10var foo = function() {
11 return 7;
12 },
13 bar = function() {
14 return 8;
15 };
16
17// Local Variables:
18// indent-tabs-mode: nil
19// js-indent-level: 2
20// js-indent-first-init: t
21// End:
diff --git a/test/indent/js.js b/test/indent/js.js
index 2d458e1b769..2120233259a 100644
--- a/test/indent/js.js
+++ b/test/indent/js.js
@@ -9,7 +9,7 @@ var e = 100500,
9 9
10function test () 10function test ()
11{ 11{
12 return /[/]/.test ('/') // (bug#19397) 12 return /[/]/.test ('/') // (bug#19397)
13} 13}
14 14
15var f = bar('/protocols/') 15var f = bar('/protocols/')
@@ -60,3 +60,16 @@ var evens = [e for each (e in range(0, 21))
60a++ 60a++
61b += 61b +=
62 c 62 c
63
64baz(`http://foo.bar/${tee}`)
65 .qux();
66
67`multiline string
68 contents
69 are kept
70 unchanged!`
71
72// Local Variables:
73// indent-tabs-mode: nil
74// js-indent-level: 2
75// End:
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 82cc63f9168..dec6de98605 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -40,6 +40,10 @@ x = toto / foo if /do bar/ =~ "dobar"
40 40
41/foo/xi != %r{bar}mo.tee 41/foo/xi != %r{bar}mo.tee
42 42
43foo { /"tee/
44 bar { |qux| /'fee"/ } # bug#20026
45}
46
43bar(class: XXX) do # ruby-indent-keyword-label 47bar(class: XXX) do # ruby-indent-keyword-label
44 foo 48 foo
45end 49end
diff --git a/test/indent/sgml-mode-attribute.html b/test/indent/sgml-mode-attribute.html
new file mode 100644
index 00000000000..4cbec0af2c6
--- /dev/null
+++ b/test/indent/sgml-mode-attribute.html
@@ -0,0 +1,14 @@
1<element attribute="value"></element>
2
3<element
4 attribute="value">
5 <element
6 attribute="value">
7 </element>
8</element>
9
10<!--
11 Local Variables:
12 sgml-attribute-offset: 2
13 End:
14 -->