]> git.eshelyaron.com Git - emacs.git/commitdiff
; Tighten up vc-state tests, allowed by the previous change
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 1 May 2017 01:28:18 +0000 (04:28 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 1 May 2017 01:30:01 +0000 (04:30 +0300)
test/lisp/vc/vc-tests.el

index ad4399db03253f7268e46315cf5e6b9bc3c93d14..f2898cb6d2ccc0c956a427ee95838950f2869fc6 100644 (file)
@@ -329,8 +329,10 @@ This checks also `vc-backend' and `vc-responsible-backend'."
            ;; Write a new file.  Check state.
            (write-region "foo" nil tmp-name nil 'nomessage)
 
-            (message "vc-state3 %s" (vc-state tmp-name))
-           (should (null (vc-state tmp-name)))
+            ;; nil: Mtn
+            ;; unregistered: Bzr CVS Git Hg SVN RCS
+            (message "vc-state3 %s %s" backend (vc-state tmp-name backend))
+           (should (memq (vc-state tmp-name backend) '(nil unregistered)))
 
            ;; Register a file.  Check state.
            (vc-register
@@ -348,10 +350,11 @@ This checks also `vc-backend' and `vc-responsible-backend'."
                      'vc-test--unregister-function backend tmp-name)
                     'vc-not-supported)
                 (message "vc-state5 unsupported")
-              ;; nil: Bzr Git Hg RCS
+              ;; unregistered: Bzr Git RCS Hg
               ;; unsupported: CVS Mtn SCCS SRC SVN
-              (message "vc-state5 %s" (vc-state tmp-name))
-              (should (null (vc-state tmp-name))))))
+              (message "vc-state5 %s %s" backend (vc-state tmp-name backend))
+              (should (memq (vc-state tmp-name backend)
+                            '(nil unregistered))))))
 
       ;; Save exit.
       (ignore-errors (run-hooks 'vc-test--cleanup-hook)))))