diff options
| author | Richard Stallman | 2015-04-05 08:36:56 -0400 |
|---|---|---|
| committer | Richard Stallman | 2015-04-05 08:42:43 -0400 |
| commit | 4e23cd0ccde4ad1e14fe2870ccf140487af649b2 (patch) | |
| tree | b709ac1e92a892f6ec1faa85eb59a9e5960c25dd /test/indent | |
| parent | dca743f0941909a80e3f28c023977120b6203e20 (diff) | |
| parent | 16eec6fc55dcc05d1d819f18998e84a9580b2521 (diff) | |
| download | emacs-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/Makefile | 7 | ||||
| -rw-r--r-- | test/indent/js-indent-init-dynamic.js | 30 | ||||
| -rw-r--r-- | test/indent/js-indent-init-t.js | 21 | ||||
| -rw-r--r-- | test/indent/js.js | 15 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 4 | ||||
| -rw-r--r-- | test/indent/sgml-mode-attribute.html | 14 |
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 @@ | |||
| 1 | RM=rm | 1 | RM=rm |
| 2 | EMACS=emacs | 2 | EMACS=../../src/emacs |
| 3 | |||
| 4 | all: clean $(addsuffix .test,$(wildcard *.*)) | ||
| 3 | 5 | ||
| 4 | clean: | 6 | clean: |
| 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 @@ | |||
| 1 | var foo = function() { | ||
| 2 | return 7; | ||
| 3 | }; | ||
| 4 | |||
| 5 | var foo = function() { | ||
| 6 | return 7; | ||
| 7 | }, | ||
| 8 | bar = 8; | ||
| 9 | |||
| 10 | var 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 | |||
| 27 | var 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 @@ | |||
| 1 | var foo = function() { | ||
| 2 | return 7; | ||
| 3 | }; | ||
| 4 | |||
| 5 | var foo = function() { | ||
| 6 | return 7; | ||
| 7 | }, | ||
| 8 | bar = 8; | ||
| 9 | |||
| 10 | var 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 | ||
| 10 | function test () | 10 | function test () |
| 11 | { | 11 | { |
| 12 | return /[/]/.test ('/') // (bug#19397) | 12 | return /[/]/.test ('/') // (bug#19397) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | var f = bar('/protocols/') | 15 | var f = bar('/protocols/') |
| @@ -60,3 +60,16 @@ var evens = [e for each (e in range(0, 21)) | |||
| 60 | a++ | 60 | a++ |
| 61 | b += | 61 | b += |
| 62 | c | 62 | c |
| 63 | |||
| 64 | baz(`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 | ||
| 43 | foo { /"tee/ | ||
| 44 | bar { |qux| /'fee"/ } # bug#20026 | ||
| 45 | } | ||
| 46 | |||
| 43 | bar(class: XXX) do # ruby-indent-keyword-label | 47 | bar(class: XXX) do # ruby-indent-keyword-label |
| 44 | foo | 48 | foo |
| 45 | end | 49 | end |
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 | --> | ||