summaryrefslogtreecommitdiff
path: root/test/ess-test-r.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2019-06-10 14:06:22 +0200
committerVitalie Spinu <spinuvit@gmail.com>2019-06-10 14:10:02 +0200
commit37f14fd2bc075c2246ff6e4a115e5441def210cf (patch)
tree99996b3c62b54819e3949a0470e770d23970f232 /test/ess-test-r.el
parentd0139665142d5390f5efc7c84dee442831be440b (diff)
[Fix #820] Start backward search for function from next line
Diffstat (limited to 'test/ess-test-r.el')
-rw-r--r--test/ess-test-r.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/ess-test-r.el b/test/ess-test-r.el
index f7d9e3d..be9381d 100644
--- a/test/ess-test-r.el
+++ b/test/ess-test-r.el
@@ -513,7 +513,18 @@ fun2 <- function(x) x"
(should (looking-at-p "f6 = function"))
(re-search-forward "some_code7")
(ess-r-beginning-of-function)
- (should (looking-at-p "f7 = function"))))
+ (should (looking-at-p "f7 = function"))
+
+ (goto-char (point-min))
+ (search-forward "f8 <-")
+ (ess-r-beginning-of-function)
+ (should (looking-at-p "f8 <-"))
+
+ (goto-char (point-min))
+ (search-forward "f9 <-")
+ (beginning-of-line 1)
+ (ess-r-beginning-of-function)
+ (should (looking-at-p "f8 <-"))))
(ert-deftest ess-r-goto-beginning/end-of-function-or-para-test ()
(with-ess-test-r-file (expand-file-name "navigation.R" ess-test-fixtures-directory)