mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-15 17:00:26 +00:00
Make vc-test-svn03-working-revision pass
* test/automated/vc-tests.el (vc-test--working-revision): Fix `vc-working-revision' checks to be compared against nil, which is what is should return for unregistered files.
This commit is contained in:
parent
fa7f79e823
commit
66e6398505
@ -1,3 +1,9 @@
|
||||
2015-02-07 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* automated/vc-tests.el (vc-test--working-revision): Fix
|
||||
`vc-working-revision' checks to be compared against nil, which is
|
||||
what is should return for unregistered files.
|
||||
|
||||
2015-02-06 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
* automated/seq-tests.el: New tests for seq-mapcat, seq-partition
|
||||
|
@ -330,18 +330,20 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
||||
(vc-working-revision default-directory backend) '("0" "master")))
|
||||
|
||||
(let ((tmp-name (expand-file-name "foo" default-directory)))
|
||||
;; Check for initial state.
|
||||
(should
|
||||
(member (vc-working-revision tmp-name backend) '("0" "master")))
|
||||
;; Check for initial state, should be nil until it's registered.
|
||||
;; Don't pass the backend explictly, otherwise some implementations
|
||||
;; return non-nil.
|
||||
(should (null (vc-working-revision tmp-name)))
|
||||
|
||||
;; Write a new file. Check for state.
|
||||
;; Write a new file. Check state.
|
||||
(write-region "foo" nil tmp-name nil 'nomessage)
|
||||
(should
|
||||
(member (vc-working-revision tmp-name backend) '("0" "master")))
|
||||
(should (null (vc-working-revision tmp-name)))
|
||||
|
||||
;; Register a file. Check for state.
|
||||
(vc-register
|
||||
(list backend (list (file-name-nondirectory tmp-name))))
|
||||
;; FIXME: Don't pass the backend. Emacs should be able to
|
||||
;; figure it out.
|
||||
(should
|
||||
(member (vc-working-revision tmp-name backend) '("0" "master")))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user