diff options
author | Glenn Morris <rgm@gnu.org> | 2011-10-20 18:23:54 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-10-20 18:23:54 -0400 |
commit | e195ae68f843264360ae147e1bc1d47ede35ad7a (patch) | |
tree | 3590f7c203a9f92fd7c48650e77d37a5b32c3e91 /test/automated | |
parent | 516eddb0513bf9c1e4e4c1e25509953d4b8f935c (diff) | |
download | emacs-e195ae68f843264360ae147e1bc1d47ede35ad7a.tar.gz emacs-e195ae68f843264360ae147e1bc1d47ede35ad7a.tar.bz2 emacs-e195ae68f843264360ae147e1bc1d47ede35ad7a.zip |
* test/automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
Diffstat (limited to 'test/automated')
-rw-r--r-- | test/automated/vc-bzr.el | 37 |
1 files changed, 37 insertions, 0 deletions
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 @@ (should (search-forward "unregistered" nil t)))) (delete-directory tempdir t)))) +;; Not specific to bzr. +(ert-deftest vc-bzr-test-bug9781 () + "Test for http://debbugs.gnu.org/9781 ." + :expected-result (if (executable-find vc-bzr-program) :passed :failed) + (should (executable-find vc-bzr-program)) + (let* ((tempdir (make-temp-file "vc-bzr-test" t)) + (subdir (expand-file-name "subdir" tempdir)) + (file (expand-file-name "file" tempdir)) + (default-directory (file-name-as-directory tempdir))) + (unwind-protect + (progn + (call-process vc-bzr-program nil nil nil "init") + (make-directory subdir) + (with-temp-buffer + (insert "text") + (write-region nil nil file nil 'silent) + (write-region nil nil (expand-file-name "subfile" subdir) + nil 'silent)) + (call-process vc-bzr-program nil nil nil "add") + (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1") + (call-process vc-bzr-program nil nil nil "remove" subdir) + (with-temp-buffer + (insert "different text") + (write-region nil nil file nil 'silent)) + (vc-dir tempdir) + (while (vc-dir-busy) + (sit-for 0.1)) + (vc-dir-mark-all-files t) + (let ((f (symbol-function 'y-or-n-p))) + (unwind-protect + (progn + (fset 'y-or-n-p (lambda (prompt) t)) + (vc-next-action nil)) + (fset 'y-or-n-p f))) + (should (get-buffer "*vc-log*"))) + (delete-directory tempdir t)))) + ;;; vc-bzr.el ends here |