diff options
| author | Alan Mackenzie | 2020-10-02 17:25:02 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2020-10-02 17:25:02 +0000 |
| commit | 6a6466031839d5fb4efadbfe2cdbd5ba469dd9c6 (patch) | |
| tree | d1a0593271b24616450e75dcac17a742ebc5d3f5 /test/data | |
| parent | 70f8d9a8683a27ac00a2e74c15c0b5b5c6f9bbe2 (diff) | |
| download | emacs-6a6466031839d5fb4efadbfe2cdbd5ba469dd9c6.tar.gz emacs-6a6466031839d5fb4efadbfe2cdbd5ba469dd9c6.zip | |
Enhance syntax-tests.el to test comments in scan-lists
This now tests the interface between scan_lists and the comment functions.
* test/src/syntax-tests.el (syntax-br-comments): New macro.
({-in, ;-in, /*-in): Set parse-sexp-ignore-comments to t.
(top level): Add 15 tests for comments inside brace lists.
* test/data/syntax-comments.txt (top level): Amend some test fragments.
Diffstat (limited to 'test/data')
| -rw-r--r-- | test/data/syntax-comments.txt | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt index 74e08b1b65b..e10c1450e46 100644 --- a/test/data/syntax-comments.txt +++ b/test/data/syntax-comments.txt | |||
| @@ -23,6 +23,21 @@ | |||
| 23 | 13 | 23 | 13 |
| 24 | 15/* /*/15 | 24 | 15/* /*/15 |
| 25 | 25 | ||
| 26 | /* C Comments within lists */ | ||
| 27 | 59}59 | ||
| 28 | 50{ /* comment */ }50 | ||
| 29 | 51{ /**/ }51 | ||
| 30 | 52{ // comment | ||
| 31 | }52 | ||
| 32 | 53{ // | ||
| 33 | }53 | ||
| 34 | 54{ // \ | ||
| 35 | }54 | ||
| 36 | 55{/* */}55 | ||
| 37 | 56{ /* \*/ }56 | ||
| 38 | 57*/57 | ||
| 39 | 58}58 | ||
| 40 | |||
| 26 | 41 | ||
| 27 | /* Straight Pascal comments (not nested) */ | 42 | /* Straight Pascal comments (not nested) */ |
| 28 | 20}20 | 43 | 20}20 |
| @@ -46,20 +61,6 @@ | |||
| 46 | 33; \ | 61 | 33; \ |
| 47 | 33 | 62 | 33 |
| 48 | 63 | ||
| 49 | /* Comments within lists */ | ||
| 50 | 50{ /* comment */ }50 | ||
| 51 | 51{ /**/ }51 | ||
| 52 | 52{ // comment | ||
| 53 | }52 | ||
| 54 | 53{ // | ||
| 55 | }53 | ||
| 56 | 54{ // | ||
| 57 | }54 | ||
| 58 | 55{/* */}55 | ||
| 59 | 56{ /* \*/ }56 | ||
| 60 | 57*/57 | ||
| 61 | 58}58 | ||
| 62 | |||
| 63 | Local Variables: | 64 | Local Variables: |
| 64 | mode: fundamental | 65 | mode: fundamental |
| 65 | eval: (set-syntax-table (make-syntax-table)) | 66 | eval: (set-syntax-table (make-syntax-table)) |