diff options
| author | Eli Zaretskii | 2017-02-14 18:17:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-02-14 18:17:51 +0200 |
| commit | c1eb871e92176092a46b74b68655c3c167ccece9 (patch) | |
| tree | 1d6f02ff7a9c9196771be8604459d489a1a77424 | |
| parent | 3f383a4668e6b9e45067389c997a5b1f4cddd3fd (diff) | |
| download | emacs-c1eb871e92176092a46b74b68655c3c167ccece9.tar.gz emacs-c1eb871e92176092a46b74b68655c3c167ccece9.zip | |
; * test/file-organization.org: Minor copyedits.
| -rw-r--r-- | test/file-organization.org | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/test/file-organization.org b/test/file-organization.org index dba5f4ff712..8d9c6716372 100644 --- a/test/file-organization.org +++ b/test/file-organization.org | |||
| @@ -21,31 +21,39 @@ C source is stored in the ~src~ directory, which is flat. | |||
| 21 | 21 | ||
| 22 | ** Test Files | 22 | ** Test Files |
| 23 | 23 | ||
| 24 | Automated tests should be stored in the ~test/automated/lisp~ directory. Tests | 24 | Automated tests should be stored in the ~test/lisp~ directory for |
| 25 | should reflect the directory structure of the source tree; so tests for files | 25 | tests of functionality implemented in Lisp, and in the ~test/src~ |
| 26 | in the ~emacs-lisp~ source directory should reside in the | 26 | directory for functionality implemented in C. Tests should reflect |
| 27 | the directory structure of the source tree; so tests for files in the | ||
| 28 | ~lisp/emacs-lisp~ source directory should reside in the | ||
| 27 | ~test/lisp/emacs-lisp~ directory. | 29 | ~test/lisp/emacs-lisp~ directory. |
| 28 | 30 | ||
| 29 | Tests should normally reside in a file with ~-tests~ added to the name of | 31 | Tests should normally reside in a file with ~-tests.el~ added to the |
| 30 | the tested source file; hence ~ert.el~ is tested in ~ert-tests.el~, or | 32 | base-name of the tested source file; hence ~ert.el~ is tested in |
| 31 | ~pcase.el~ is tested in ~pcase-tests.el~. Exceptionally, tests for a | 33 | ~ert-tests.el~, and ~pcase.el~ is tested in ~pcase-tests.el~. As n |
| 32 | single feature may be placed into multiple files of any name which are | 34 | exception, tests for a single feature may be placed into multiple |
| 33 | themselves placed in a directory named after the feature with ~-tests~ | 35 | files of any name which are themselves placed in a directory named |
| 34 | appended, such as ~/test/lisp/emacs-lisp/eieio-tests~ | 36 | after the feature with ~-tests~ appended, such as |
| 37 | ~/test/lisp/emacs-lisp/eieio-tests~ | ||
| 35 | 38 | ||
| 36 | Where features of the C source are tested using Emacs-Lisp test files, these | 39 | Similarly, features implemented in C should reside in ~/test/src~ and |
| 37 | should reside in ~/test/src~ and be named after the C file. | 40 | be named after the C file with ~-tests.el~ added to the base-name of |
| 41 | the tested source file. Thus, tests for ~src/fileio.c~ should be in | ||
| 42 | ~test/src/fileio-tests.el~. | ||
| 38 | 43 | ||
| 39 | There are also some test materials that cannot be run automatically | 44 | There are also some test materials that cannot be run automatically |
| 40 | (i.e. via ert). These should be placed in ~/test/manual~ | 45 | (i.e. via ert). These should be placed in ~/test/manual~; they are |
| 46 | not run by the "make check" command and its derivatives. | ||
| 41 | 47 | ||
| 42 | ** Resource Files | 48 | ** Resource Files |
| 43 | 49 | ||
| 44 | Resource files for tests (containing test data) should reside in a directory | 50 | Resource files for tests (containing test data) should reside in a |
| 45 | named after the feature with a ~-resources~ suffix, and located in the same | 51 | directory named after the feature with a ~-resources~ suffix, and |
| 46 | directory as the feature. Hence, the lisp file ~flymake.el~ should have test | 52 | located in the same directory as the feature. Hence, the lisp file |
| 47 | files in ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a | 53 | ~flymake.el~ should have test files in |
| 54 | ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a | ||
| 48 | directory called ~/test/automated/lisp/progmodes/flymake-resources~. | 55 | directory called ~/test/automated/lisp/progmodes/flymake-resources~. |
| 49 | 56 | ||
| 50 | No guidance is given for the organization of resource files inside the | 57 | No guidance is given for the organization of resource files inside the |
| 51 | ~-resource~ directory; files can be organized at the author's discretion. | 58 | ~-resource~ directory; files can be organized at the author's |
| 59 | discretion. | ||