Commit Graph

2543 Commits

Author SHA1 Message Date
Eric Schulte 8efcd4338d adding test of error when exporting marked subtree with code blocks 2010-12-13 12:41:55 -07:00
David Maus 1b5ff1e341 Add test for escaping and unescaping url with already escaped char
* test-org.el (test-org/org-link-escape-url-with-escaped-char): Add
test for escaping and unescaping url with already escaped char.
2010-11-29 21:04:41 +01:00
Eric Schulte d24b04d82f ob: cleaner parsing of header arguments
Thanks to Charles C. Berry for insisting on this issues existence

  This change is now secured with a unit test

* lisp/ob.el (org-babel-parse-header-arguments): Stripping trailing
  spaces off of header arguments (even the first one).
2010-11-23 09:39:26 -07:00
David Maus 6de7ac6b89 New function: Run all tests for current file
* org-test.el (org-test-current-file): New function.  Run all tests
for current file.
2010-11-22 19:29:05 +01:00
David Maus 47486604a4 New tests for unicode aware percent escaping
* test-org.el (test-org/org-link-escape-ascii-character)
(test-org/org-link-escape-ascii-ctrl-character)
(test-org/org-link-escape-multibyte-character)
(test-org/org-link-escape-custom-table)
(test-org/org-link-escape-custom-table-merge)
(test-org/org-link-unescape-ascii-character)
(test-org/org-link-unescape-ascii-ctrl-character)
(test-org/org-link-unescape-multibyte-character)
(test-org/org-link-unescape-ascii-extended-char): New tests for
unicode aware percent escaping

All tests for escaping/unescaping multibyte characters are expected to
fail at the moment, because org-link-escape/unescape is not yet
unicode aware.
2010-11-21 19:51:50 +01:00
Eric Schulte 68b5ca3989 updated tests to accommodate new #+call: line header arg. pass-through 2010-11-08 14:26:47 -07:00
David Maus f99197e143 `which-function' does not return a list, but the name of the function
* org-test.el (org-test-current-defun): `which-function' does not
return a list, but the name of the function.
2010-11-02 21:11:16 +01:00
Eric Schulte 6599e17654 babel: uncomment test-ob-lob.el test which seems to have stochastic failures 2010-10-21 07:53:33 -06:00
Eric Schulte 09758a4b81 babel: updating tests 2010-10-21 07:11:27 -06:00
Eric Schulte 6fa1ae974a minor test cleanup 2010-10-21 13:06:56 +01:00
Eric Schulte e905dbe0f6 babel hashing now handles more complex types in params
* lisp/ob.el (org-babel-sha1-hash): now handles more complex types in
  params
* testing/examples/babel.org: whitespace
* testing/lisp/test-ob.el (test-org-babel/sha1-hash): new test for
  babel hashing
2010-10-21 13:06:55 +01:00
Eric Schulte fd97cb9386 ob-lob: now working with the new variable resolution setup
* lisp/ob-lob.el (org-babel-lob-execute): now expanding variable
  references before execution

* lisp/ob.el (org-babel-merge-params): better indentation, and finally
  sorted out the proper replacement of conflicting variable
  definitions
2010-10-21 13:06:00 +01:00
Eric Schulte 1412447d61 babel evaluation once again working in tables
* lisp/ob-table.el (sbe): reworking for better indentation and to
  integrate the new variable resolution
2010-10-21 13:06:00 +01:00
Eric Schulte 832dc71f31 ob-lob: now working with the new ob-get-src-block-info
ob-get-src-block-info wasn't correctly returning the name of the
  code block

* lisp/ob-lob.el (org-babel-lob-ingest): now returns the count of
  ingested code blocks

* lisp/ob.el (org-babel-get-src-block-info): walks up possible
  additional header arg lines before checking for the code block name

  (org-babel-merge-params): can now handle empty variables gracefully
2010-10-21 13:06:00 +01:00
Eric Schulte 3ab7f12792 org-test is now ready for the newyears 2010-10-21 13:06:00 +01:00
Eric Schulte 9931dae20a babel: exporting now working with the new ob-get-src-block-info schema
includes a simple export test

* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
  collecting information from within the original export file

  (org-babel-exp-src-blocks): simplified through use of the above
  macro

  (org-babel-exp-code): simplified through the use of new functions
  for parsing header arguments

  (org-babel-exp-results): simpler high-level organization, also this
  is now where the expansion of variable references takes place during
  export

* lisp/ob.el (org-babel-expand-variables): broke variable replacement
  in a parameter list into it's own function

  (org-babel-get-src-block-info): now using the above function
2010-10-21 13:05:59 +01:00
Eric Schulte 9ba9ef99a6 babel: now allows multi-line header arguments with #+headers: before code block
for example, from the test of this functionality
* multi-line header arguments
  :PROPERTIES:
  :ID:       b77c8857-6c76-4ea9-8a61-ddc2648d96c4
  :END:

  (map 'list #'list numbers letters)

| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |

* lisp/ob.el (org-babel-multi-line-header-regexp): new variable for
  matching header lines preceding code blocks

  (org-babel-src-name-w-name-regexp): now includes possible header
  lines between source name and code block

  (org-babel-get-src-block-info): now also collecting header arguments
  from preceding header lines

  (org-babel-src-block-names): updated match-string to reflect new
  value of org-babel-src-name-w-name-regexp

  (org-babel-merge-params): fixed error in variable string regexp
2010-10-21 13:05:59 +01:00
Eric Schulte 3d2aec3588 adding simple test of variable resolution 2010-10-21 13:05:59 +01:00
Eric Schulte a9f3c9fe11 now using newer version of jump.el -- run $ git submodule update 2010-10-21 13:05:59 +01:00
Eric Schulte c9b017632e ob-sh: no longer fails on empty results
* lisp/ob-sh.el (org-babel-sh-evaluate): no longer assumes that
  results are non-nil
2010-10-15 09:25:33 -06:00
Eric Schulte 1ff357d59f removing old testing file as it can cause errors
the file testing/org-html.el will live on in the git VC history
2010-10-15 09:15:01 -06:00
Eric Schulte d32c8d49e5 ob-tangle: only create links for blocks that will actually tangle
this commit includes a unit test

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): only create
  links for blocks that will actually tangle
2010-10-14 17:15:11 -06:00
Eric Schulte b04265eabc ob-sh: don't insert extra newlines in the beginning of the body
* lisp/ob-sh.el (org-babel-expand-body:sh): don't insert extra
  newlines in expanded shell bodies
2010-10-14 08:10:23 -06:00
Eric Schulte 38df64b4f6 tests: adding test for eval'd elisp forms in header arguments 2010-10-14 07:32:21 -06:00
Eric Schulte 19efdcca43 added tangle tests exercising new desired tangling behavior 2010-10-06 10:23:50 -06:00
Eric Schulte 462fc24cd3 typo in testing/README.org, once again, thanks Nick Dokos
* testing/README.org: type
2010-10-06 09:04:06 -06:00
Eric Schulte be42b2fb51 ensuring that test files include org-test in their load path
again thanks to Nick Dokos for pointing this out
2010-10-06 09:02:25 -06:00
Eric Schulte 25c9d74352 ensure that the testing/contrib/lisp directory is created
thanks to Nick Dokos for noticing this
2010-10-06 08:58:08 -06:00
Eric Schulte d9e4469c1c updated testing/README.org describing how to get started writing tests 2010-10-05 20:55:45 -06:00
Eric Schulte e1b90eea45 ob-exp: fixed export when headings have links, with tests
also some organization of the test directory

* lisp/ob-exp.el (org-babel-exp-src-blocks): fixed export when
  headings have links, with tests
2010-10-05 11:54:48 -06:00
Eric Schulte 41cde9d9bd test: re-arranging example files into their own directory 2010-10-05 11:54:48 -06:00
Eric Schulte d6143f1e7a added a test ensuring that export works from buffers which aren't visiting files 2010-10-05 11:54:48 -06:00
Eric Schulte 49b22bb57e more permissive selector in `org-test-run-all-tests' 2010-10-05 11:54:48 -06:00
Eric Schulte 5bafe303aa beginning tests for ob-exp, and related improvements to org-test
- fixed issue in creation of new files
  - fixed issue in org-test-in-file
  - new example file w/o any headlines
2010-10-05 11:54:48 -06:00
Eric Schulte 9bd5f511ce improving test-helper macros for better name-spaceing and more flexibility 2010-10-05 11:54:48 -06:00
Eric Schulte 271d1bb986 fixed `org-test-load' so that is recursively loads all test files 2010-10-05 11:54:48 -06:00
Eric Schulte e694d1fe39 requiring ert and jump, and using jump for navigation `org-test-jump' 2010-10-05 11:54:48 -06:00
Eric Schulte 58b0242bcb updating org-testing requires to load ert and jump.el 2010-10-05 11:54:48 -06:00
Eric Schulte 509ee52b53 adding ERT and jump.el as git submodules 2010-10-05 11:54:48 -06:00
Eric Schulte 70ee58a8ab merge ert-testing and schulte-testing, temporarily removing navigation functions 2010-10-05 11:54:48 -06:00
Sebastian Rose, Hannover, Germany 2b52d1911c Create a test file per defun.
* org-test-which-func: New function.  Find name of defun around point.

* org-test-ensure-buffer-emacs-lisp-p: New function.  Ensure a buffer
  hold an elisp file based on filename extension.
2010-10-05 11:54:48 -06:00
Sebastian Rose, Hannover, Germany 399e488146 Initial ERT test: org-test.el 2010-10-05 11:54:48 -06:00
Tom Breton (Tehom) 2db83d6a39 Moved tests into testing/ directory 2010-05-17 18:18:34 -04:00