[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116406: * automated/tramp-tests.el (top): Require `
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r116406: * automated/tramp-tests.el (top): Require `vc', `vc-bzr', `vc-git' |
Date: |
Tue, 11 Feb 2014 08:32:07 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116406
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2014-02-11 09:31:39 +0100
message:
* automated/tramp-tests.el (top): Require `vc', `vc-bzr', `vc-git'
and `vc-hg'. Declare `tramp-find-executable' and
`tramp-get-remote-path'.
(tramp-test29-vc-registered): New test.
(tramp-test30-utf8): Rename from `tramp-test29-utf8'.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/tramp-tests.el tramptests.el-20131105142319-d9zp3oprkpxj5v1e-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2014-02-07 15:47:18 +0000
+++ b/test/ChangeLog 2014-02-11 08:31:39 +0000
@@ -1,3 +1,11 @@
+2014-02-11 Michael Albinus <address@hidden>
+
+ * automated/tramp-tests.el (top): Require `vc', `vc-bzr', `vc-git'
+ and `vc-hg'. Declare `tramp-find-executable' and
+ `tramp-get-remote-path'.
+ (tramp-test29-vc-registered): New test.
+ (tramp-test30-utf8): Rename from `tramp-test29-utf8'.
+
2014-02-07 Michael Albinus <address@hidden>
* automated/tramp-tests.el (tramp-test26-process-file): Improve test.
=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el 2014-02-07 15:56:15 +0000
+++ b/test/automated/tramp-tests.el 2014-02-11 08:31:39 +0000
@@ -37,6 +37,13 @@
(require 'ert)
(require 'tramp)
+(require 'vc)
+(require 'vc-bzr)
+(require 'vc-git)
+(require 'vc-hg)
+
+(declare-function tramp-find-executable "tramp-sh")
+(declare-function tramp-get-remote-path "tramp-sh")
;; There is no default value on w32 systems, which could work out of the box.
(defconst tramp-test-temporary-file-directory
@@ -1188,7 +1195,55 @@
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
(ignore-errors (delete-file tmp-name)))))
-(ert-deftest tramp-test29-utf8 ()
+(ert-deftest tramp-test29-vc-registered ()
+ "Check `vc-registered'."
+ (skip-unless (tramp--test-enabled))
+ (skip-unless
+ (eq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ 'tramp-sh-file-name-handler))
+ (tramp-cleanup-connection
+ (tramp-dissect-file-name tramp-test-temporary-file-directory)
+ nil 'keep-password)
+
+ (let* ((default-directory tramp-test-temporary-file-directory)
+ (tmp-name1 (tramp--test-make-temp-name))
+ (tmp-name2 (expand-file-name "foo" tmp-name1))
+ (vc-handled-backends
+ (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+ (cond
+ ((tramp-find-executable v vc-bzr-program (tramp-get-remote-path v))
+ '(Bzr))
+ ((tramp-find-executable v vc-git-program (tramp-get-remote-path v))
+ '(Git))
+ ((tramp-find-executable v vc-hg-program (tramp-get-remote-path v))
+ '(Hg))
+ (t nil)))))
+ (skip-unless vc-handled-backends)
+ (message "%s" vc-handled-backends)
+
+ (unwind-protect
+ (progn
+ (make-directory tmp-name1)
+ (write-region "foo" nil tmp-name2)
+ (should (file-directory-p tmp-name1))
+ (should (file-exists-p tmp-name2))
+ (should-not (vc-registered tmp-name1))
+ (should-not (vc-registered tmp-name2))
+
+ (let ((default-directory tmp-name1))
+ ;; Create empty repository, and register the file.
+ (vc-create-repo (car vc-handled-backends))
+ ;; The structure of VC-FILESET is not documented. Let's
+ ;; hope it won't change.
+ (vc-register
+ nil (list (car vc-handled-backends)
+ (list (file-name-nondirectory tmp-name2)))))
+ (should (vc-registered tmp-name2)))
+
+ (ignore-errors (delete-directory tmp-name1 'recursive)))))
+
+(ert-deftest tramp-test30-utf8 ()
"Check UTF8 encoding in file names and file contents."
(skip-unless (tramp--test-enabled))
(tramp-cleanup-connection
@@ -1227,7 +1282,6 @@
;; * make-auto-save-file-name
;; * set-file-acl
;; * set-file-selinux-context
-;; * vc-registered
;; * Fix `tramp-test17-insert-directory' for
;; `ls-lisp-insert-directory' ("plink" and friends).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116406: * automated/tramp-tests.el (top): Require `vc', `vc-bzr', `vc-git',
Michael Albinus <=