diff options
Diffstat (limited to 'test/lisp/vc')
| -rw-r--r-- | test/lisp/vc/vc-tests/vc-tests.el | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lisp/vc/vc-tests/vc-tests.el b/test/lisp/vc/vc-tests/vc-tests.el index 77e77ededfb..ca3b62ee9e8 100644 --- a/test/lisp/vc/vc-tests/vc-tests.el +++ b/test/lisp/vc/vc-tests/vc-tests.el | |||
| @@ -651,6 +651,7 @@ This checks also `vc-backend' and `vc-responsible-backend'." | |||
| 651 | (make-directory default-directory) | 651 | (make-directory default-directory) |
| 652 | (vc-test--create-repo-function backend) | 652 | (vc-test--create-repo-function backend) |
| 653 | 653 | ||
| 654 | ;; Test mix of registered and unregistered files. | ||
| 654 | (let* ((tmp-dir (expand-file-name "dir1/" default-directory)) | 655 | (let* ((tmp-dir (expand-file-name "dir1/" default-directory)) |
| 655 | (tmp-name1 (expand-file-name "foo" tmp-dir)) | 656 | (tmp-name1 (expand-file-name "foo" tmp-dir)) |
| 656 | (tmp-name2 (expand-file-name "bar" tmp-dir)) | 657 | (tmp-name2 (expand-file-name "bar" tmp-dir)) |
| @@ -670,7 +671,22 @@ This checks also `vc-backend' and `vc-responsible-backend'." | |||
| 670 | (should-not (file-exists-p tmp-name1)) | 671 | (should-not (file-exists-p tmp-name1)) |
| 671 | (should-not (file-exists-p tmp-name2)) | 672 | (should-not (file-exists-p tmp-name2)) |
| 672 | (should (file-exists-p new-name1)) | 673 | (should (file-exists-p new-name1)) |
| 673 | (should (file-exists-p new-name2)))) | 674 | (should (file-exists-p new-name2))) |
| 675 | |||
| 676 | ;; Test only unregistered files. | ||
| 677 | (let* ((tmp-dir (expand-file-name "dir3/" default-directory)) | ||
| 678 | (tmp-name (expand-file-name "foo" tmp-dir)) | ||
| 679 | (new-dir (expand-file-name "dir4/" default-directory)) | ||
| 680 | (new-name (expand-file-name "foo" new-dir))) | ||
| 681 | (make-directory tmp-dir) | ||
| 682 | (write-region "foo" nil tmp-name nil 'nomessage) | ||
| 683 | |||
| 684 | (vc-rename-file (directory-file-name tmp-dir) | ||
| 685 | (directory-file-name new-dir)) | ||
| 686 | (should-not (file-exists-p tmp-name)) | ||
| 687 | (should-not (file-exists-p tmp-name)) | ||
| 688 | (should (file-exists-p new-name)) | ||
| 689 | (should (file-exists-p new-name)))) | ||
| 674 | 690 | ||
| 675 | ;; Save exit. | 691 | ;; Save exit. |
| 676 | (ignore-errors | 692 | (ignore-errors |