Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tests: make sure git commands are run in temp repository

  • Loading branch information...
commit 17fdd01c1e52dd929c8463b56446587304b6ede4 1 parent e35fe65
@sigma authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/magit-tests.el
View
6 tests/magit-tests.el
@@ -11,12 +11,14 @@
(defmacro with-temp-git-repo (repo &rest body)
(declare (indent 1) (debug t))
- `(let ((,repo (make-temp-file "tmp_git" t)))
+ `(let* ((,repo (make-temp-file "tmp_git" t))
+ (default-directory (concat ,repo "/")))
(unwind-protect
(progn
(magit-init repo)
,@body)
- (delete-directory ,repo t))))
+ (delete-directory ,repo t)
+ )))
(defun magit-tests-section-has-item-title (title &optional section-path)
(let ((children (magit-section-children
Please sign in to comment.
Something went wrong with that request. Please try again.