aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Burkett <justin@burkett.cc>2018-01-09 12:24:06 -0500
committerJustin Burkett <justin@burkett.cc>2018-01-09 12:25:38 -0500
commit249d2e866e5da57921b6bbc3f4f25fc1ea7572d8 (patch)
tree80f9757c97855d0545f812300f96ace5ef6b7506
parent5e1f851f6531029ddb77a2ffb893ad9628b68454 (diff)
Remove evil-temp-filename
With the previous change, this function just serves to obfuscate the use of make-temp-file. It's probably clearer to use make-temp-file directly.
-rw-r--r--evil-test-helpers.el6
-rw-r--r--evil-tests.el6
2 files changed, 4 insertions, 8 deletions
diff --git a/evil-test-helpers.el b/evil-test-helpers.el
index c70ea21..03e5cf3 100644
--- a/evil-test-helpers.el
+++ b/evil-test-helpers.el
@@ -383,10 +383,6 @@ is executed at the end."
(goto-char (overlay-end ,overlay))
(evil-test-text (or ,end-string ,string) nil nil ,after-predicate))))
-(defun evil-temp-filename ()
- "Return an appropriate temporary filename."
- (make-temp-file "evil-test"))
-
(defmacro evil-with-temp-file (file-var content &rest body)
"Create a temp file with CONTENT and bind its name to FILE-VAR within BODY.
FILE-VAR must be a symbol which contains the name of the
@@ -398,7 +394,7 @@ while the temporary file exists. The temporary file is deleted at
the end of the execution of BODY."
(declare (indent 2)
(debug (symbolp form body)))
- `(let ((,file-var (evil-temp-filename)))
+ `(let ((,file-var (make-temp-file "evil-test")))
(with-temp-file ,file-var
,(if (stringp content)
`(insert ,content)
diff --git a/evil-tests.el b/evil-tests.el
index 2ab00d4..e0e3fbf 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -7445,7 +7445,7 @@ maybe we need one line more with some text\n")
(":w")
(file filename "line1\nline2\nline3\nline4\nline5\n"))))
(ert-info ("Write current buffer to new file")
- (let ((filename (evil-temp-filename)))
+ (let ((filename (make-temp-file "evil-test-write")))
(evil-test-buffer
"[l]ine1\nline2\nline3\nline4\nline5\n"
(delete-file filename)
@@ -7453,7 +7453,7 @@ maybe we need one line more with some text\n")
(file filename "line1\nline2\nline3\nline4\nline5\n")
(delete-file filename))))
(ert-info ("Write part of a buffer")
- (let ((filename (evil-temp-filename)))
+ (let ((filename (make-temp-file "evil-test-write")))
(evil-test-buffer
"[l]ine1\nline2\nline3\nline4\nline5\n"
(delete-file filename)
@@ -7461,7 +7461,7 @@ maybe we need one line more with some text\n")
(file filename "line2\nline3\n")
(delete-file filename))))
(ert-info ("Appending a file")
- (let ((filename (evil-temp-filename)))
+ (let ((filename (make-temp-file "evil-test-write")))
(evil-test-buffer
"[l]ine1\nline2\nline3\nline4\nline5\n"
(delete-file filename)