]> git.eshelyaron.com Git - emacs.git/commitdiff
Make vc-test-svn03-working-revision pass
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 7 Feb 2015 01:18:24 +0000 (04:18 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 7 Feb 2015 01:26:05 +0000 (04:26 +0300)
* 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.

test/ChangeLog
test/automated/vc-tests.el

index f9a54b53420a7ec81b5eeefba124e0923806eb18..e0d4eeb323a4822fc2f708cc59a6ea0740406948 100644 (file)
@@ -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
index 5b7b3cce039ed4a2cc8465a0959600f9a687239c..e83eb85c0fee6497b47595e01f9361bbdecef43b 100644 (file)
@@ -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")))