aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lisp/test-ob-R.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test-ob-R.el: Add tests for :results outputmainJeremie Juste2022-12-031-0/+33
| | | | | | | | | * test-ob-R.el (ob-session-R-results-output, ob-session-R-results-output-no-drawer): Two new functions to test that :results works as expected with and without drawers. This commit is to ensure that the bug reported in https://list.orgmode.org/87h6yel4vr.fsf@localhost/, does not happen again.
* testing: Make all files use `lexical-binding`Stefan Monnier2022-09-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mainly, add the corresponding cookie, but also add various `require`s so that the compiler knows which vars should be trated as dynbound. This does not fix all the warnings, but does try to eliminate all those about "unused" variables. For the variables truly unused, the patch usually adds an underscore to their name to silence the warning. Some of the fixes affect files which already used `lexical-binding`. Not sure why the test worked before: maybe because the tests were run without compiling them first (which could cause some of the missing `require`d packages to be autoloaded before we got to the problematic code, thus hiding the problem)? I found some suspicious code, for which I added FIXMEs. There are also a few changes to the main files. * lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Don't call `server-edit` if it's not yet defined. [ Needed to get the tests to pass. ] * lisp/ob-core.el (org-babel-temporary-directory) (org-babel-temporary-stable-directory): Always define (and use nil if we don't want to create a directory for it). Simplify the code based on the fact that (defvar V E) only evaluates E if V is not yet `boundp`. (org-babel-temp-file, org-babel-temp-stable-file) (org-babel-remove-temporary-directory) (org-babel-remove-temporary-stable-directory): Adjust accordingly. * lisp/org.el (org-log-beginning): Add FIXME. * testing/org-test.el: Require `org` and `org-id`. (org-id-locations-file): Don't `defconst` it. (org-test-at-id, org-test-in-example-file, org-test-at-marker) (org-test-with-temp-text, org-test-with-temp-text-in-file): Move edebug specs into `declare` (and simplify them). (org-test-with-tramp-remote-dir--worker): Declare dynbound tramp vars. (org--compile-when): Fix quoting of `exp`. (org-test-load): Tweak regexps. * testing/org-batch-test-init.el: Tweak regexp, remove dead code and add a FIXME about it. * testing/lisp/test-ox.el: Require `ox` instead of erroring out if it's not already loaded. Also require `org-inlinetask`. (org-test-with-parsed-data): Silence warnings when `info` is not used. (test-org-export/bind-keyword): Add FIXME. * testing/lisp/test-ox-publish.el: Require `org-test` and `ox-publish`. (test-org-publish/resolve-external-link): Expose lambdas to the compiler. Remove unused var `ids`. (test-org-publish/get-project-from-filename): Remove unused var `file`. * testing/lisp/test-org.el: Require `org-macs`, `org`, `org-inlinetask`, `org-refile`, and `org-agenda`. (test-org/org-read-date): Declare `org-time-was-given` as dynbound. (test-org/set-regexps-and-options): Add FIXME. * testing/lisp/test-org-timer.el: Require `org-timer`. * testing/lisp/test-org-table.el: Require `ox`. * testing/lisp/test-org-protocol.el: Require `org-protocol` instead of erroring out if it's not already loaded. Also require `capture`, and add missing `provide` statement. * testing/lisp/test-org-pcomplete.el: Require `org`. * testing/lisp/test-org-list.el: Require `org-list` and `org`. * testing/lisp/test-org-lint.el: Require `org-footnote` and `org-lint`. * testing/lisp/test-org-footnote.el: Require `org-footnote`. * testing/lisp/test-org-element.el: Require `org-element` instead of erroring out if it's not already loaded. Also require `org` and `org-inlinetask`. * testing/lisp/test-org-duration.el: Require `org-duration`. * testing/lisp/test-org-datetree.el: Require `org-datetree`. * testing/lisp/test-org-colview.el: Require `org-colview`, `org-duration`, and `org-inlinetask`. * testing/lisp/test-org-clock.el: Require `org-duration` and `org-clock`. * testing/lisp/test-org-archive.el: Require `org-archive`. * testing/lisp/test-org-agenda.el (test-org-agenda/bulk-custom-arg-func): Add FIXME. * testing/lisp/test-ol.el: Require `ol` and `org-id`. (test-org-link/store-link): Declare `org-store-link-props` and add FIXME. * testing/lisp/test-oc.el (test-org-cite/export-capability): Add FIXME. * testing/lisp/test-ob.el: Require `ob-core`, `org-src`, `ob-ref`, and `org-table`. (test-ob/eval-header-argument): Rename `foo` to `test-ob--foo` and declare it as dynbound. (test-ob/blocks-with-spaces, test-ob/specific-colnames): Add FIXME. (test-ob/noweb-expansions-in-cache): Declare `noweb-expansions-in-cache-var` as dynbound. * testing/lisp/test-ob-tangle.el: Require `org` and `ob-tangle`. * testing/lisp/test-ob-shell.el: * testing/lisp/test-ob-python.el: Require `ob-core`. * testing/lisp/test-ob-lob.el: Require `ob-lob`. (temporary-value-for-test): Declare as dynbound. * testing/lisp/test-ob-plantuml.el: Require `ob-plantuml` instead of erroring out if it's not already loaded. * testing/lisp/test-ob-lilypond.el: Require `ob-lilypond` instead of erroring out if it's not already loaded. Use `with-current-buffer`. * testing/lisp/test-ob-julia.el: Require `ob-core`. * testing/lisp/test-ob-java.el (org-babel-temporary-directory): Remove dead code now that `org-babel-temporary-directory` is always bound. * testing/lisp/test-ob-exp.el: Require `ob-exp`, `org-src`, and `org-test`. (ob-exp/evaluate-all-executables-in-order): Declare `*evaluation-collector*` as dynbound. * testing/lisp/test-ob-emacs-lisp.el (ob-emacs-lisp/dynamic-lexical-edit) (ob-emacs-lisp/dynamic-lexical-execute): Rename dynbound var to `ob-emacs--x` and declare it as such. * testing/lisp/test-ob-R.el: Require `ob-core`. (ess-ask-for-ess-directory, ess-history-file): Declare vars.
* lisp/ob-R: Async evaluation in RJeremie Juste2021-09-281-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/ob-R.el (ob-session-async-R-indicator): Add constant representing a prefix R to identity session. (ob-session-async-org-babel-R-evaluate-session): New function to evaluate R src block asynchrously. (ob-session-async-R-value-callback): New function that calls back the result of the asynchronous evaluation. (org-babel-R-evaluate): Add `async' parameter and call `ob-session-async-org-babel-R-evaluate-session' if `async' parameter is present. (org-babel-execute:R): Call `org-babel-comint-use-async' to check if async is among `params' and add async parameter to `org-babel-R-evaluate'. * testing/lisp/test-ob-R.el: Add 7 more tests for async evaluations, also taken from the `ob-session-async' package. This is almost a carbon copy of Jack Kamm's `ob-session-async'. The original source code can be found https://github.com/jackkamm/ob-session-async. Please refer to the following thread to trace back the discussion on async evaluation in R: https://list.orgmode.org/87eed9g9p6.fsf@gmail.com/
* test-ob-R.el: add tests for how NA values are printedJeremie Juste2021-05-031-0/+9
| | | | | | | | * testing/lisp/test-ob-R.el (ert-deftest test-ob-r/NA-blank): new test for :results value. Make sure that NA values in R data.frames are empty string instead of nil previously see https://orgmode.org/list/87pn1dufm2.fsf@gmail.com/
* test-ob-R.el: add tests for output with substrings matching promptJeremie Juste2021-05-031-0/+46
| | | | | | | | | | | * testing/lisp/test-ob-R.el (test-ob-r/output-with-<>): new test for output angle brackets (test-ob-R/output-nonprinted): New test for output results that aren't explicitly printed. (Here all the lines are expected to be printed not just the last one) Patch suggested by Jack Kamm: https://orgmode.org/list/87h7slgbi5.fsf@gmail.com/
* Prefer HTTPS to HTTP for links to gnu.orgStefan Kangas2021-03-211-1/+1
|
* Update copyright yearBastien2019-01-011-1/+1
|
* testing/lisp/test-ob-R.el: Initialize ESS vars for :session testsCharles Berry2016-01-241-12/+14
| | | | | | | | | | | * test-ob-R.el: (test-ob-R/simple-session, test-ob-R/results-file) tests start sessions. As a consequence `ess-ask-for-ess-directory' and `ess-history-file' are let bound to `nil' to avoid prompting for the startup directory and using a history file. Bug Reported by: Achim Gratz Subject: [Bug] Testing: ESS (*R*, R (newest)) starting data directory? Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/104424>
* ob-R.el: Trim extraneous newline from resultsCharles Berry2016-01-191-0/+16
| | | | | | | | | | | | | | * lisp/ob-R.el: org-babel-R-evaluate-external-process and org-babel-R-evaluate-session trim the extraneous newlines from the end of R output. * testing/lisp/test-ob-R.el: test-ob-R/results-file tests that `:results file' yields one line enclosed in square brackets for a result like "abc/def.ghi". Fixes issue noted by Andreas Leha Subject: [babel] return file from R Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/103658>
* Update copyright years again.Bastien Guerry2014-01-071-1/+1
| | | | Hint: copyright years are all updated in Emacs.
* Revert "Update copyright years."Bastien Guerry2014-01-051-1/+1
| | | | This reverts commit 21105594fcb69fb4e1d636f4070fd25c86efbe35.
* Update copyright years.Bastien Guerry2014-01-041-1/+1
|
* Update copyright years.Bastien Guerry2013-01-011-1/+1
| | | | Happy new year!
* Fix copyright notices for test files.Bastien Guerry2012-12-131-2/+14
|
* do not set variables belonging to ESSAchim Gratz2012-09-231-3/+4
| | | | | | | | | | | | | * lisp/ob-R.el (org-babel-R-initiate-session): Protect against use of unbound variable `ess-ask-for-ess-directory´. The default for this variable is true, so act accordingly if it is found unbound. * lisp/ob-R.el: Remove initialization with `nil´ from `ess-ask-for-ess-directory´ and `ess-local-process-name´. Remove second declaration for `ess-local-process-name´. * testing/lisp/test-ob-R.el (test-ob-R/simple-session): Bind `ess-ask-for-ess-directory´ to nil to facilitate batch testing.
* Fix the master branch.Bastien Guerry2012-03-191-10/+4
| | | | | | | | | | | I started from the 78ec8e commit then cherry-picked and squashed commits that have been done in master since then, except the bad commits that overwrote the tree (in master) with the tree in maint. This commit also bumps the version number to 7.8.06. The only "fix" that was made between 78ec8e and the previous commit is e0072f which has been reported to break stuff.
* Manually revert maint to e85080.Bastien Guerry2012-03-171-4/+10
| | | | | | e85080 is the last correct commit in the maint branch before releasing 7.8.04. The 7.8.05 release should be done from this commit.
* Manually revert to the Release 7.8.04 tag.Bastien Guerry2012-03-171-10/+4
|
* Manually revert back to commit e85080.Bastien Guerry2012-03-171-4/+10
| | | | | | | | | | | | This fixes a wrong merge that should not have happened: commit 7e903a merges the master branch into the maint branch, while we really want to keep the maint branch a bugfix-only branch. This commit reverts back the maint branch to its state before merging the master branch. From there, we will fix remaining problems with the maint branch (e.g. copyright issues) then release this maint branch as Org-mode 7.8.05.
* cleaning headers of test files -- removing loads and requiresEric Schulte2012-02-291-9/+3
|
* Fix copyright (to 2012) year and Org version (to 7.8.03).Bastien Guerry2012-01-031-1/+1
|
* tests for the colnames header argumentEric Schulte2011-11-281-1/+48
|
* Indicate tests with missing dependencies by adding a expected failing testEric Schulte2011-11-151-1/+1
| | | | | | | | | | | * testing/lisp/test-ob-R.el (featurep): Signal missing dependencies with an error rather than a throw. * testing/org-test.el (missing-test-dependency): Define the error signal for missing dependencies. (org-test-for-executable): Signal missing dependencies with an error rather than a throw. (org-test-load): Define an expected failing test for each file with missing dependencies.
* org tests using throw/catch rather than errors to avoid loading unsupported ↵Eric Schulte2011-09-241-1/+1
| | | | tests
* only load those test files for which the required executables are presentEric Schulte2011-09-211-0/+4
| | | | | | | | | | | | | * testing/org-test.el (org-exe-not-found): An error type used to signal a missing executable (org-test-for-executable): A function used by test files to throw an error if a required executable is not present. (org-test-load): Simply skip files for which the required executables are not present. * testing/lisp/test-ob-R.el: Conditional loading. * testing/lisp/test-ob-awk.el: Conditional loading. * testing/lisp/test-ob-fortran.el: Conditional loading.
* fix leftover cruft in test-ob-R.elEric Schulte2011-09-211-4/+4
|
* adding a file for R testsEric Schulte2011-09-211-0/+26
* testing/lisp/test-ob-R.el (test-ob-R/simple-session): Simple session test.