diff options
| author | Glenn Morris | 2011-10-20 18:23:54 -0400 |
|---|---|---|
| committer | Glenn Morris | 2011-10-20 18:23:54 -0400 |
| commit | e195ae68f843264360ae147e1bc1d47ede35ad7a (patch) | |
| tree | 3590f7c203a9f92fd7c48650e77d37a5b32c3e91 /test | |
| parent | 516eddb0513bf9c1e4e4c1e25509953d4b8f935c (diff) | |
| download | emacs-e195ae68f843264360ae147e1bc1d47ede35ad7a.tar.gz emacs-e195ae68f843264360ae147e1bc1d47ede35ad7a.zip | |
* test/automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 2 | ||||
| -rw-r--r-- | test/automated/vc-bzr.el | 37 |
2 files changed, 39 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 366ad44c712..396273bab37 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-10-20 Glenn Morris <rgm@gnu.org> | 1 | 2011-10-20 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * automated/vc-bzr.el (vc-bzr-test-bug9781): New test. | ||
| 4 | |||
| 3 | * automated/vc-bzr.el: New file. | 5 | * automated/vc-bzr.el: New file. |
| 4 | 6 | ||
| 5 | 2011-10-15 Glenn Morris <rgm@gnu.org> | 7 | 2011-10-15 Glenn Morris <rgm@gnu.org> |
diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el index 8a80fe280f2..b2cbda4d669 100644 --- a/test/automated/vc-bzr.el +++ b/test/automated/vc-bzr.el | |||
| @@ -61,4 +61,41 @@ | |||
| 61 | (should (search-forward "unregistered" nil t)))) | 61 | (should (search-forward "unregistered" nil t)))) |
| 62 | (delete-directory tempdir t)))) | 62 | (delete-directory tempdir t)))) |
| 63 | 63 | ||
| 64 | ;; Not specific to bzr. | ||
| 65 | (ert-deftest vc-bzr-test-bug9781 () | ||
| 66 | "Test for http://debbugs.gnu.org/9781 ." | ||
| 67 | :expected-result (if (executable-find vc-bzr-program) :passed :failed) | ||
| 68 | (should (executable-find vc-bzr-program)) | ||
| 69 | (let* ((tempdir (make-temp-file "vc-bzr-test" t)) | ||
| 70 | (subdir (expand-file-name "subdir" tempdir)) | ||
| 71 | (file (expand-file-name "file" tempdir)) | ||
| 72 | (default-directory (file-name-as-directory tempdir))) | ||
| 73 | (unwind-protect | ||
| 74 | (progn | ||
| 75 | (call-process vc-bzr-program nil nil nil "init") | ||
| 76 | (make-directory subdir) | ||
| 77 | (with-temp-buffer | ||
| 78 | (insert "text") | ||
| 79 | (write-region nil nil file nil 'silent) | ||
| 80 | (write-region nil nil (expand-file-name "subfile" subdir) | ||
| 81 | nil 'silent)) | ||
| 82 | (call-process vc-bzr-program nil nil nil "add") | ||
| 83 | (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1") | ||
| 84 | (call-process vc-bzr-program nil nil nil "remove" subdir) | ||
| 85 | (with-temp-buffer | ||
| 86 | (insert "different text") | ||
| 87 | (write-region nil nil file nil 'silent)) | ||
| 88 | (vc-dir tempdir) | ||
| 89 | (while (vc-dir-busy) | ||
| 90 | (sit-for 0.1)) | ||
| 91 | (vc-dir-mark-all-files t) | ||
| 92 | (let ((f (symbol-function 'y-or-n-p))) | ||
| 93 | (unwind-protect | ||
| 94 | (progn | ||
| 95 | (fset 'y-or-n-p (lambda (prompt) t)) | ||
| 96 | (vc-next-action nil)) | ||
| 97 | (fset 'y-or-n-p f))) | ||
| 98 | (should (get-buffer "*vc-log*"))) | ||
| 99 | (delete-directory tempdir t)))) | ||
| 100 | |||
| 64 | ;;; vc-bzr.el ends here | 101 | ;;; vc-bzr.el ends here |