emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106154: * test/automated/vc-bzr.el (


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106154: * test/automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
Date: Thu, 20 Oct 2011 18:23:54 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106154
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-10-20 18:23:54 -0400
message:
  * test/automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
modified:
  test/ChangeLog
  test/automated/vc-bzr.el
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2011-10-20 03:39:45 +0000
+++ b/test/ChangeLog    2011-10-20 22:23:54 +0000
@@ -1,5 +1,7 @@
 2011-10-20  Glenn Morris  <address@hidden>
 
+       * automated/vc-bzr.el (vc-bzr-test-bug9781): New test.
+
        * automated/vc-bzr.el: New file.
 
 2011-10-15  Glenn Morris  <address@hidden>

=== modified file 'test/automated/vc-bzr.el'
--- a/test/automated/vc-bzr.el  2011-10-20 03:39:45 +0000
+++ b/test/automated/vc-bzr.el  2011-10-20 22:23:54 +0000
@@ -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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]