[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b514e21 093/187: * async-test.el: Remove now unnecessary t
From: |
Michael Albinus |
Subject: |
[elpa] master b514e21 093/187: * async-test.el: Remove now unnecessary tests. |
Date: |
Wed, 30 Dec 2015 11:49:54 +0000 |
branch: master
commit b514e217a7578d7941f619521bab27799ddb2cc8
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
* async-test.el: Remove now unnecessary tests.
---
async-test.el | 147 ---------------------------------------------------------
1 files changed, 0 insertions(+), 147 deletions(-)
diff --git a/async-test.el b/async-test.el
index 379cdf9..3abbe0a 100644
--- a/async-test.el
+++ b/async-test.el
@@ -130,153 +130,6 @@
(lambda (result)
(message "Async process done: %s" result))))
-(defsubst async-file-contents (file)
- "Return the contents of FILE, as a string."
- (with-temp-buffer
- (insert-file-contents file)
- (buffer-string)))
-
-(defun* async-do-copy-file-test (ok-if-already-exists
- keep-time preserve-uid-gid
- preserve-selinux-context
- &key use-native-commands
- synchronously)
- (let* ((temp-file (make-temp-file "async-do-copy-file-test"))
- (temp-file2 (concat temp-file ".target")))
- (unwind-protect
- (progn
- (with-temp-buffer
- (insert "async-do-copy-file-test")
- (write-region (point-min) (point-max) temp-file))
-
- (let* ((async-file-use-native-commands use-native-commands)
- (future (if synchronously
- (copy-file temp-file temp-file2
- ok-if-already-exists
- keep-time
- preserve-uid-gid
- preserve-selinux-context)
- (async-copy-file temp-file temp-file2
- ok-if-already-exists
- keep-time
- preserve-uid-gid
- preserve-selinux-context
- :callback nil))))
- (unless synchronously
- (if use-native-commands
- (let ((proc (async-get future)))
- (should (processp proc))
- (should (equal 'exit (process-status proc))))
- (should (equal (async-get future) nil))))
-
- (should (file-readable-p temp-file2))
-
- (should (equal "async-do-copy-file-test"
- (async-file-contents temp-file2)))))
-
- (if (file-exists-p temp-file) (delete-file temp-file))
- (if (file-exists-p temp-file2) (delete-file temp-file2)))))
-
-(ert-deftest async-copy-file-lisp-sync-1 ()
- (async-do-copy-file-test t t t nil :synchronously t))
-(ert-deftest async-copy-file-lisp-1 ()
- (async-do-copy-file-test t t t nil :use-native-commands nil))
-(ert-deftest async-copy-file-native-1 ()
- (async-do-copy-file-test t t t nil :use-native-commands t))
-
-(defsubst async-file-make-temp-dir (prefix)
- "Make a temporary directory using PREFIX.
-Return the name of the directory."
- (let ((dir (make-temp-name
- (expand-file-name prefix temporary-file-directory))))
- (make-directory dir)
- dir))
-
-(defsubst async-file-make-file (file contents)
- "Create a new FILE with the given CONTENTS."
- (with-temp-buffer
- (insert contents)
- (write-region (point-min) (point-max) file)))
-
-(defun* async-do-copy-directory-test (keep-time parents copy-contents
- &key use-native-commands
- synchronously)
- (let* ((temp-dir (async-file-make-temp-dir "async-do-copy-directory-test"))
- (temp-dir2 (concat temp-dir ".target")))
- (unwind-protect
- (progn
- (async-file-make-file (expand-file-name "foo" temp-dir) "foo")
- (async-file-make-file (expand-file-name "bar" temp-dir) "bar")
-
- ;; Shouldn't the parents argument cause this to happen when needed?
- ;; But if the following is wrapped with "unless parents", even
- ;; `async-copy-directory-lisp-sync-2' fails.
- (make-directory temp-dir2)
-
- (let* ((async-file-use-native-commands use-native-commands)
- (future (if synchronously
- (copy-directory temp-dir temp-dir2
- keep-time
- parents
- copy-contents)
- (async-copy-directory temp-dir temp-dir2
- keep-time
- parents
- copy-contents
- :callback nil))))
- (unless synchronously
- (if use-native-commands
- (let ((proc (async-get future)))
- (should (processp proc))
- (should (equal 'exit (process-status proc))))
- ;; Ignore the return value from `copy-directory'
- (async-get future)))
-
- (if (and parents copy-contents)
- (should (file-directory-p temp-dir2)))
-
- (let* ((target (if copy-contents
- temp-dir2
- (expand-file-name (file-name-nondirectory
temp-dir)
- temp-dir2)))
- (foo-file (expand-file-name "foo" target))
- (bar-file (expand-file-name "bar" target)))
-
- (should (file-readable-p foo-file))
- (should (file-readable-p bar-file))
-
- (should (equal "foo" (async-file-contents foo-file)))
- (should (equal "bar" (async-file-contents bar-file))))))
-
- (if (file-directory-p temp-dir) (delete-directory temp-dir t))
- (if (file-directory-p temp-dir2) (delete-directory temp-dir2 t)))))
-
-(ert-deftest async-copy-directory-lisp-sync-1 ()
- (async-do-copy-directory-test t nil nil :synchronously t))
-(ert-deftest async-copy-directory-lisp-sync-2 ()
- (async-do-copy-directory-test t t nil :synchronously t))
-(ert-deftest async-copy-directory-lisp-sync-3 ()
- (async-do-copy-directory-test t nil t :synchronously t))
-(ert-deftest async-copy-directory-lisp-sync-4 ()
- (async-do-copy-directory-test t t t :synchronously t))
-
-(ert-deftest async-copy-directory-lisp-1 ()
- (async-do-copy-directory-test t nil nil :use-native-commands nil))
-(ert-deftest async-copy-directory-lisp-2 ()
- (async-do-copy-directory-test t t nil :use-native-commands nil))
-(ert-deftest async-copy-directory-lisp-3 ()
- (async-do-copy-directory-test t nil t :use-native-commands nil))
-(ert-deftest async-copy-directory-lisp-4 ()
- (async-do-copy-directory-test t t t :use-native-commands nil))
-
-(ert-deftest async-copy-directory-native-1 ()
- (async-do-copy-directory-test t nil nil :use-native-commands t))
-(ert-deftest async-copy-directory-native-2 ()
- (async-do-copy-directory-test t t nil :use-native-commands t))
-(ert-deftest async-copy-directory-native-3 ()
- (async-do-copy-directory-test t nil t :use-native-commands t))
-(ert-deftest async-copy-directory-native-4 ()
- (async-do-copy-directory-test t t t :use-native-commands t))
(provide 'async-test)
- [elpa] master 4a7b07b 084/187: Merge pull request #23 from DarwinAwardWinner/no-load-path-fix, (continued)
- [elpa] master 4a7b07b 084/187: Merge pull request #23 from DarwinAwardWinner/no-load-path-fix, Michael Albinus, 2015/12/30
- [elpa] master 2a532d3 077/187: Replace closure prevention with closure sanitation, Michael Albinus, 2015/12/30
- [elpa] master f18c735 078/187: Merge pull request #19 from DarwinAwardWinner/lexbind-fix, Michael Albinus, 2015/12/30
- [elpa] master 3f751fb 082/187: Revert master back to 242ae73, Michael Albinus, 2015/12/30
- [elpa] master eff5419 088/187: Rename helm-async.el to dired-async.el, Michael Albinus, 2015/12/30
- [elpa] master ec8decc 090/187: * dired-async.el (helm-async-be-async): alias for dired-async-be-async., Michael Albinus, 2015/12/30
- [elpa] master 5ff0f9b 087/187: * helm-async.el: Use cl-lib instead of cl., Michael Albinus, 2015/12/30
- [elpa] master aabc7b4 086/187: * helm-async.el: Rename all with dired-async prefix instead of helm-async., Michael Albinus, 2015/12/30
- [elpa] master a37e1db 089/187: * dired-async.el: Finish converting all names to dired*., Michael Albinus, 2015/12/30
- [elpa] master b311374 092/187: * dired-async.el (dired-async-mode): Notify number of jobs running in lighter., Michael Albinus, 2015/12/30
- [elpa] master b514e21 093/187: * async-test.el: Remove now unnecessary tests.,
Michael Albinus <=
- [elpa] master 4d14cbb 094/187: * async-test.el: Update copyrights., Michael Albinus, 2015/12/30
- [elpa] master 3712607 097/187: * smtpmail-async.el: Exclude some vars when injecting (#22)., Michael Albinus, 2015/12/30
- [elpa] master a0195ad 104/187: Fix markdown in README, Michael Albinus, 2015/12/30
- [elpa] master 3a23aa1 095/187: * dired-async.el (helm-async-be-async): Move it as obsolete variable alias to helm., Michael Albinus, 2015/12/30
- [elpa] master eaa0ec1 098/187: * smtpmail-async.el: Fix encoding problems (#27), Michael Albinus, 2015/12/30
- [elpa] master 05c9861 103/187: * smtpmail-async.el (async-smtpmail-before-send-hook): Add docstring., Michael Albinus, 2015/12/30
- [elpa] master b2b4bd6 107/187: * async-bytecomp.el: New file., Michael Albinus, 2015/12/30
- [elpa] master b67254c 096/187: * smtpmail-async.el (async-smtpmail-send-it): Eval content of buffer outside temp buffer.(attempt to fix issue in mu4e), Michael Albinus, 2015/12/30
- [elpa] master 1c54de3 091/187: * README.md: Update., Michael Albinus, 2015/12/30
- [elpa] master f48fe54 099/187: * smtpmail-async.el: Try to catch 'done to not exit when smtpmail-via-smtp is recalled (#22)., Michael Albinus, 2015/12/30