|author||Michael Brand <email@example.com>||2016-06-25 15:08:23 (GMT)|
|committer||Michael Brand <firstname.lastname@example.org>||2016-06-25 15:08:23 (GMT)|
* testing/README: Minor update, add how to run several tests.
1 files changed, 30 insertions, 26 deletions
diff --git a/testing/README b/testing/README
index 7b322ad..4d28edb 100644
@@ -38,7 +38,7 @@ The options in the above command are explained below.
* Trigger testing with 'make test'
-Target =test= can be used to trigger a test run.
+Target ~test~ can be used to trigger a test run.
#+BEGIN_SRC sh :dir (expand-file-name "..")
@@ -78,36 +78,40 @@ load and run the test suite with the following commands.
When a test fails, run it interactively and investigate the problem
in the ERT results buffer.
- How to run one test:
- Use this as a demo example of a failing test
+ To run one test: Use this as a demo example of a failing test
(ert-deftest test-org/org-link-escape-ascii-character-demo-of-fail ()
- (should (string= "%5B" ;; expecting %5B is right
+ (should (string= "%5B" ; Expecting %5B is correct.
- (should (string= "%5C" ;; expecting %5C is wrong, %5D right
+ (should (string= "%5C" ; Expecting %5C is wrong, %5D correct.
- or evaluate the ert-deftest form of the test you want to run. Then
- "M-x ert RET test-org/org-link-escape-ascii-character-demo-of-fail RET"
- When not visible yet switch to the ERT results buffer named
- "\*ert\*". When a test failed the ERT results buffer shows the
- details of the first "should" that failed. See
- (info "(ert)Running Tests Interactively") on how to re-run, start
- the debugger etc.
- How to run all tests of a single test file:
- "M-x ert-delete-all-tests RET", confirm. Open the file
- ./lisp/test-*.el, "M-x eval-buffer RET", "M-x ert RET t RET"
- Consider to set pp-escape-newlines nil before running the test when
- looking at "should" in the ERT results buffer. Especially when
- using "l" to look at passed test results and possibly missing an
- appropriate setting of pp-escape-newlines made only temporarily for
- the running time of the test as e. g. tests using
- org-test-table-target-expect-tblfm do.
+ or evaluate the ~ert-deftest form~ of the test you want to run.
+ Then ~M-x ert RET
+ test-org/org-link-escape-ascii-character-demo-of-fail RET~. When
+ not visible yet switch to the ERT results buffer named ~*ert*~.
+ When a test failed the ERT results buffer shows the details of the
+ first ~should~ that failed. See ~(info "(ert)Running Tests
+ Interactively")~ on how to re-run, start the debugger etc.
+ To run several tests: ~M-x ert RET "<your regexp here>" RET~.
+ To run all tests of a single test file: ~M-x ert-delete-all-tests
+ RET~ and confirm. ~M-x load-file RET testing/lisp/<file>.el RET
+ M-x ert RET t RET~.
+ Consider to set
+ #+BEGIN_SRC emacs-lisp
+ (setq pp-escape-newlines nil)
+ before running the test when looking at ~should~ in the ERT results
+ buffer. Especially when using ~l~ to look at passed test results
+ and possibly missing an appropriate setting of ~pp-escape-newlines~
+ made only temporarily for the running time of the test as
+ e. g. tests using ~org-test-table-target-expect-tblfm~ do.
-- If the value of the =org-babel-no-eval-on-ctrl-c-ctrl-c= is non-nil
- then it will result in some test failure, as there are tests which
- rely on this behavior.
+- If the variable ~org-babel-no-eval-on-ctrl-c-ctrl-c~ is non-nil then
+ it will result in some test failure, as there are tests which rely
+ on this behavior.