diff options
| author | Alan Mackenzie | 2020-10-01 20:35:40 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2020-10-01 20:35:40 +0000 |
| commit | da591df90ae95a6bc34f43b1594fc58a91967304 (patch) | |
| tree | ea1d997f7a393626e25fc373435ab29c6218f798 /test/data | |
| parent | 306fcc59dcd7d2a6ec8338dfff520a89d7a9121d (diff) | |
| download | emacs-da591df90ae95a6bc34f43b1594fc58a91967304.tar.gz emacs-da591df90ae95a6bc34f43b1594fc58a91967304.zip | |
Enhance syntax-tests.el to test some comment character handling.
* test/src/syntax-tests: Add a new section testing some aspects of comment
handling in syntax.c. This needs further enhancement. It uses ....
* test/data/syntax-comments.txt: A new test file.
Diffstat (limited to 'test/data')
| -rw-r--r-- | test/data/syntax-comments.txt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/test/data/syntax-comments.txt b/test/data/syntax-comments.txt new file mode 100644 index 00000000000..74e08b1b65b --- /dev/null +++ b/test/data/syntax-comments.txt | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /* This file is a test file for tests of the comment handling in src/syntax.c. | ||
| 2 | This includes the testing of comments which figure in parse-partial-sexp | ||
| 3 | and scan-lists. */ | ||
| 4 | |||
| 5 | /* Straight C comments */ | ||
| 6 | 1/* comment */1 | ||
| 7 | 2/**/2 | ||
| 8 | 3// comment | ||
| 9 | 3 | ||
| 10 | 4// | ||
| 11 | 4 | ||
| 12 | 5/*/5 | ||
| 13 | 6*/6 | ||
| 14 | 7/* \*/7 | ||
| 15 | 8*/8 | ||
| 16 | 9/* \\*/9 | ||
| 17 | 10*/10 | ||
| 18 | 11// \ | ||
| 19 | 12 | ||
| 20 | 11 | ||
| 21 | 13// \\ | ||
| 22 | 14 | ||
| 23 | 13 | ||
| 24 | 15/* /*/15 | ||
| 25 | |||
| 26 | |||
| 27 | /* Straight Pascal comments (not nested) */ | ||
| 28 | 20}20 | ||
| 29 | 21{ Comment }21 | ||
| 30 | 22{}22 | ||
| 31 | 23{ | ||
| 32 | }23 | ||
| 33 | 24{ | ||
| 34 | 25{25 | ||
| 35 | }24 | ||
| 36 | 26{ \}26 | ||
| 37 | |||
| 38 | |||
| 39 | /* Straight Lisp comments (not nested) */ | ||
| 40 | 30 | ||
| 41 | 30 | ||
| 42 | 31; Comment | ||
| 43 | 31 | ||
| 44 | 32;;;;;;;;; | ||
| 45 | 32 | ||
| 46 | 33; \ | ||
| 47 | 33 | ||
| 48 | |||
| 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 | mode: fundamental | ||
| 65 | eval: (set-syntax-table (make-syntax-table)) | ||
| 66 | End: | ||