summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brand <michael.ch.brand@gmail.com>2016-06-25 15:08:23 (GMT)
committer Michael Brand <michael.ch.brand@gmail.com>2016-06-25 15:08:23 (GMT)
commit994e9ebf0bdccccd77369f52bb326c3371894c0c (patch)
tree3ba784a82d7ecc385d134e87e6a02f7e2cdbb0cd
parent4b2aa43ce686186899c2bb122856266c2f125cb8 (diff)
downloadorg-mode-master.zip
org-mode-master.tar.gz
Update testing/READMEHEADmaster
* testing/README: Minor update, add how to run several tests.
-rw-r--r--testing/README56
1 files changed, 30 insertions, 26 deletions
diff --git a/testing/README b/testing/README
index 7b322ad..4d28edb 100644
--- a/testing/README
+++ b/testing/README
@@ -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 "..")
make test
@@ -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
#+BEGIN_SRC emacs-lisp
(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.
(org-link-escape "[")))
- (should (string= "%5C" ;; expecting %5C is wrong, %5D right
+ (should (string= "%5C" ; Expecting %5C is wrong, %5D correct.
(org-link-escape "]"))))
#+END_SRC
- 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)
+ #+END_SRC
+ 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.
* Troubleshooting
-- 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.