summaryrefslogtreecommitdiff
path: root/test/ess-test-r.el
AgeCommit message (Collapse)Author
2022-11-01Fix compilation of package installed from Git; plus cosmeticsscratch/essStefan Monnier
In `test/*.el`: Provide "test/etest/etest" to `require` so Emacs can find the file when the package is compiled. In `*.el`: Prefer #' to quote named functions. Use `lexical-binding` in all the remaining files. Use lexical-binding also in `eval`. Remove redundant let-bindings of obsolete variable `inhibit-point-motion-hooks`. Replace uses of `point-at-bol` and `point-at-eol`, both marked obsolete in Emacs-29. Use `defalias` rather than `fset` to define a function. Fix occasional incorrect uses of ' in docstrings. Remove some redundant `:group` arguments. Add leading `_` to unused args. In addition to the above, a few, more specifc, tweaks: * lisp/ess-r-mode.el (ess-offset, ess-offset-type): Strength-reduce `eval` to `symbol-value`. (ess-rutils-rsitesearch): Hoist the common `browse-url` out of the `if`. * lisp/ess-r-package.el: Don't test `fboundp` before `advice-add` since we require Emacs≄25. Don't require `shell` since `advice-add` also works when the function is not yet defined. * lisp/ess-r-syntax.el (ess-parser--backward): Give it a global nil value, both to declare it as dynamically scoped and to simplify the code. All users adjusted not to bother with `bound-and-true-p`. (ess-node): Hoist common `gethash` out of the `if`. * lisp/ess-sas-a.el (ess-sas-rtf-portrait, ess-sas-rtf-landscape): Add FIXME. * lisp/ess-sas-d.el (ess-electric-run-semicolon): Re-indent. Add FIXME. * lisp/ess-sas-l.el (beginning-of-sas-statement): Rename statically scoped arg to avoid conflict with dynamically scoped var. (sas-prev-line): Make (unused) arg optional. (ess-imenu-SAS): Use [:alpha:] and [:alnum:]. * lisp/ess-tracebug.el (ess--tb-start, ess--tb-stop): Use `advice-add/remove` to redefine `ess-parse-errors`. * lisp/ess.el (ess-version-string): Don't presume `point-min` is `1`. * lisp/obsolete/ess-mouse.el (ess-mouse-me-eval-expanded): Remove unused var `page-scommand`. * lisp/obsolete/mouseme.el (mouse-me-get-string, mouse-me-find-grep): Remove unnused vars `p`, `beg`, and `end`. * test/ess-test-inf.el (ess-test-inferior-local-start-args): Use `*proc*` rather than undocumented `*inf-buf*`. (ess-inf-send-fn-test, ess-inf-send-cat-some.text-test): Remove unused var `output-nowait`. * test/ess-test-literate.el (chunk-end): Remove `defvar`. (elt-process-next-chunk, elt-process-next-subchunk, elt-process-case) (elt-process-code): Pass/take `chunk-end` as argument instead. * test/ess-test-org.el (test-org-R-ouput): Remove unused var `inf-proc`. * test/ess-test-r-utils.el (with-ess-test-file): Add FIXME. (ess-test-sleep-while, ess-test-unwind-protect): Move before first use. Split the bulk of the code into a function, to ease debugging, avoid name captures, and improve error messages. (with-r-running): Split the bulk of the code into a function. Document the `*proc*` var. Add FIXME. (output, face-at, token=): Add FIXME. (output=): Remove redundant `eval`. * test/ess-test-r.el (ess-r-inherits-prog-mode-test): Turn global `ess-test-prog-hook` var into local `pmh-was-run`. * test/literate/fontification.el (face-at-point): Remove unused function. * test/literate/roxy.el (face-at-point, faces-at-point): Remove unused functions.
2022-02-13Fix and add tests for startup directory mechanismVitalie Spinu
2021-12-25Simplify etest commands and lisp formsLionel Henry
2021-12-25Add file-local config for etestLionel Henry
Macros like `etest-deftest-r` are not compatible with `etest-update`. Instead we use a file-local variable to provide mode configuration.
2021-12-04Fix command hang with `{` expressions when `browser()` is active (#1170)Lionel Henry
2021-06-16Clean up whitespace in `ess-cycle-assign` as wellLionel Henry
Follow-up to #1150
2021-06-16Add unit test for #1150Lionel Henry
2021-03-31More robust delimited output detection in background filterLionel Henry
- Don't change process buffer and process mark - Avoid deleting any region if closing delimiter is not found. - Don't assume prompt is trailing. there might be new input in case of asynchronous interruption. - Return remaining input after closing delimiter and prompt.
2021-03-27Stop over-indenting in ess-roxy-newlineAlex Branham
Just call newline instead of newline-and-indent. electric-indent-mode has been on since Emacs 24.4 so indentation is taken care of already for us and this fixes a weird edge case with the interaction of newline-and-indent with electric-pair-mode and electric-indent-mode. Closes #1115
2021-03-07Simplify #1107 a bitVitalie Spinu
2021-03-07Fix typo when checking 'TRAVIS' environmental varDavid Pritchard
2021-03-07Update ESSR tests using more specific fcn callsDavid Pritchard
2021-03-07Add `ess--essr-remove` to testing utilsDavid Pritchard
2021-03-07Add tests for ESSR injectionDavid Pritchard
2021-02-19Use output filter in `with-r-running`Lionel Henry
Instead of ordinary filter which is for background tasks. Because the ordinary filter (currently) does not track the process mark, a test for visible region evaluation had to be updated. The previous output was wrong because linewise eval inserts user inputs in the process buffer, which interacted badly with the ordinary filter. That's why there is now an additional `+`. Before this it was inserted after the prompt (like this: `> +`) and (confusingly) removed from the test output along with the prompt.
2021-01-28Fix `ess-r-help--get-pkg-from-help-path` with dotted package namesLionel Henry
Closes #1101
2021-01-24Determine links from installed Rd ASTLionel Henry
2021-01-23Unexport internal functions and variables for R helpLionel Henry
2021-01-17Fix hanging help with comments in usage section (#1083)r2evans
Closes #1025
2021-01-09Add `:inf-cleanup` keyword in etestLionel Henry
Simplifies inferior cleanup by automatically waiting for the process prompt and flushing the inferior buffer
2021-01-09Add unit test for `rdired`Lionel Henry
2020-11-28Fix early evaluation of pager commandLionel Henry
2020-11-28Add `.ess.command()` to maintain stable `.Last.value`Lionel Henry
Fixes #1058
2020-08-22Test that "C-c C-n" evaluates visiblyLionel Henry
Issue #725, issuecomment-431782676
2020-08-22Extract `ess-test-r-set-local-process`Lionel Henry
2020-08-17Make `R` a command again (#1036)Lionel Henry
Closes #1035
2020-08-15Use etest in `ess-insert-assign-test`Lionel Henry
2020-08-15Allow `:result` to be anywhere in the deftest blockLionel Henry
2020-08-15Fix restoration of Emacs stateLionel Henry
And add test for `ess-cycle-assign`
2020-08-15Rename `:test` to `:eval`Lionel Henry
2020-08-15Use a closure to lazily generate common processLionel Henry
2020-08-15Add "RET" motion test for transcript-modeLionel Henry
Closes #1013
2020-06-19Only strip roxy prefix if the whole input is prefixed (#1022)Lionel Henry
Closes #1020
2020-05-24Fix failing testAlex Branham
* test/ess-test-r.el (ess-test-r-help-mode): Fails locally for me because the call to completing-read offers plot help from both "base" and "graphics". Fix by falling back to the car of the list if Emacs is running noninteractively. Fix test to allow for plot or plot.default.
2020-05-03Update `default-directory` of process buffer after setting wd (#1007)Lionel Henry
Instead of updating the caller's buffer. Closes #1004.
2020-04-26Fix a failing testAlex Branham
Recent versions of roxygen2 respect newlines. Since we run both new and old (on CI) versions of roxygen2, simply remove the newlines to fix the test.
2019-12-30Fix test warningsAlex Branham
2019-09-17Transfer ess vars to help pagesVitalie Spinu
2019-08-27Try enabling ess-test-r-help-modeAlex Branham
2019-07-08Revert "Make use of ert's :expected-result :failed"Alex Branham
This reverts commit 8335337e5c9c9de8bb4687d6dc85992df1267a42. That causes travis CI to hang for some reason.
2019-07-08Fix ess-narrow-to-defun-or-para and add testAlex Branham
Closes #949
2019-07-01Make use of ert's :expected-result :failedAlex Branham
In case we ever fix these tests
2019-06-10[Fix #820] Start backward search for function from next lineVitalie Spinu
2019-06-09Fix ess-roxy-update-entry when point is at beginning of a functionAlex Branham
Thanks to Marius Hofort for this bug report via the ess-help mailing list: I realized that in the current snapshot version of ESS (18.10.3), C-c C-o C-o (for Roxygen function headers) does not work as expected anymore (on macOS 10.14.5) in the following case (and others): fun1 <- function(x) x fun2 <- function(x) x If the point is right before the "f" (so column 0) of "fun2", then C-c C-o C-o puts the Roxygen header above fun1, not fun2. If the point is anywhere else on that line, the header is put in the right place, so right above fun2.
2019-05-15Document and comply with beggining/end-of-defun implicit protocolVitalie Spinu
2019-05-15[Fix #819] Fix navigation of paragraphsVitalie Spinu
2019-05-14[Fix #911] Don't overwrite local user indentation settingsVitalie Spinu
2019-05-14Fix beg/end function navigation and add new ess-r-beg/end-defun functionsVitalie Spinu
fix #820, fix #822, fix #854
2019-04-25Add tests for comint-input-ring-file-nameAlex Branham
2019-04-23Do not link function arguments in help buffersAlex Branham
Closes #855 Bug #891