From 32acfa10bc267f11b20885c6375b69d59f315d55 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 27 Feb 2017 23:10:45 +0530 Subject: Add docstring. * tests/el-exiftool-tests.el (with-temp-test-file): Add docstring. --- tests/el-exiftool-tests.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/el-exiftool-tests.el b/tests/el-exiftool-tests.el index 2ac588b..7361829 100644 --- a/tests/el-exiftool-tests.el +++ b/tests/el-exiftool-tests.el @@ -31,13 +31,14 @@ (require 'el-exiftool) (require 'ert) -(defmacro with-temp-test-file (test-filename temp-filename &rest body) +(defmacro with-temp-test-file (test-file temp-file &rest body) + "Copy TEST-FILE to temporary file, put path in TEMP-FILE, evaluate BODY." (declare (indent defun)) - `(let ((,temp-filename (make-temp-file "el-exiftool-" - nil (concat "-" ,test-filename)))) - (copy-file ,test-filename ,temp-filename t) + `(let ((,temp-file (make-temp-file "el-exiftool-" + nil (concat "-" ,test-file)))) + (copy-file ,test-file ,temp-file t) ,@body - (delete-file ,temp-filename))) + (delete-file ,temp-file))) (ert-deftest read-write-test () (with-temp-test-file "test1.png" temp-filename -- cgit v1.2.3