File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -687,8 +687,21 @@ x <- function(x){
687687 (comint-next-prompt 1 )
688688 (should (equal (line-number-at-pos ) 3 )))
689689
690+ (ert-deftest ess-test-r-startup-directory ()
691+ (let ((proj-dir (expand-file-name " .." ))
692+ (cur-dir (directory-file-name (expand-file-name default-directory))))
693+ (let ((ess-startup-directory nil ))
694+ (with-r-running nil
695+ (with-current-buffer (ess-get-process-buffer)
696+ (should (string= proj-dir (directory-file-name (expand-file-name default-directory)))))))
697+ (let ((ess-startup-directory 'default-directory ))
698+ (with-r-running nil
699+ (with-current-buffer (ess-get-process-buffer)
700+ (should (string= cur-dir (directory-file-name (expand-file-name default-directory)))))))))
701+
690702(ert-deftest ess-test-r-comint-input-ring-file-name ()
691703 (let ((ess-history-file t )
704+ (ess-startup-directory 'default-directory ) ; don't start in the project
692705 ess-history-directory)
693706 (with-r-running nil
694707 (should (string= (expand-file-name " .Rhistory" default-directory)
You can’t perform that action at this time.
0 commit comments