diff options
| author | Michael Albinus | 2015-03-01 18:05:19 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-03-01 18:05:19 +0100 |
| commit | 992f8fad978690c1aa981193d67c2f96271b890f (patch) | |
| tree | c6c0744efd5f13dd4185bb1fad351946af7cdb22 | |
| parent | 7f9b037245ddb662ad98685e429a2498ae6b7c62 (diff) | |
| download | emacs-992f8fad978690c1aa981193d67c2f96271b890f.tar.gz emacs-992f8fad978690c1aa981193d67c2f96271b890f.zip | |
Extend vc-tests.el
* automated/vc-tests.el (vc-test--create-repo): Add check for
`vc-responsible-backend'.
(vc-test--register): Do not print a message when unsupported.
(vc-test--state, vc-test--working-revision): Rework. Raise no
error in case of inconsistent result, but document everything.
(vc-test--checkout-model): New defun.
(vc-test-*-checkout-model): New tests.
| -rw-r--r-- | test/ChangeLog | 10 | ||||
| -rw-r--r-- | test/automated/vc-tests.el | 246 |
2 files changed, 204 insertions, 52 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index ff3042e8cbf..cf1b2c13d7e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2015-03-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * automated/vc-tests.el (vc-test--create-repo): Add check for | ||
| 4 | `vc-responsible-backend'. | ||
| 5 | (vc-test--register): Do not print a message when unsupported. | ||
| 6 | (vc-test--state, vc-test--working-revision): Rework. Raise no | ||
| 7 | error in case of inconsistent result, but document everything. | ||
| 8 | (vc-test--checkout-model): New defun. | ||
| 9 | (vc-test-*-checkout-model): New tests. | ||
| 10 | |||
| 1 | 2015-02-26 Fabián Ezequiel Gallina <fgallina@gnu.org> | 11 | 2015-02-26 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 12 | ||
| 3 | * automated/python-tests.el | 13 | * automated/python-tests.el |
diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el index 4d9aefad7fb..44f25728447 100644 --- a/test/automated/vc-tests.el +++ b/test/automated/vc-tests.el | |||
| @@ -27,29 +27,29 @@ | |||
| 27 | 27 | ||
| 28 | ;; BACKEND PROPERTIES | 28 | ;; BACKEND PROPERTIES |
| 29 | ;; | 29 | ;; |
| 30 | ;; * revision-granularity | 30 | ;; * revision-granularity DONE |
| 31 | 31 | ||
| 32 | ;; STATE-QUERYING FUNCTIONS | 32 | ;; STATE-QUERYING FUNCTIONS |
| 33 | ;; | 33 | ;; |
| 34 | ;; * registered (file) | 34 | ;; * registered (file) DONE |
| 35 | ;; * state (file) | 35 | ;; * state (file) DONE |
| 36 | ;; - dir-status (dir update-function) | 36 | ;; - dir-status (dir update-function) |
| 37 | ;; - dir-status-files (dir files default-state update-function) | 37 | ;; - dir-status-files (dir files default-state update-function) |
| 38 | ;; - dir-extra-headers (dir) | 38 | ;; - dir-extra-headers (dir) |
| 39 | ;; - dir-printer (fileinfo) | 39 | ;; - dir-printer (fileinfo) |
| 40 | ;; - status-fileinfo-extra (file) | 40 | ;; - status-fileinfo-extra (file) |
| 41 | ;; * working-revision (file) | 41 | ;; * working-revision (file) DONE |
| 42 | ;; - latest-on-branch-p (file) | 42 | ;; - latest-on-branch-p (file) |
| 43 | ;; * checkout-model (files) | 43 | ;; * checkout-model (files) DONE |
| 44 | ;; - mode-line-string (file) | 44 | ;; - mode-line-string (file) |
| 45 | 45 | ||
| 46 | ;; STATE-CHANGING FUNCTIONS | 46 | ;; STATE-CHANGING FUNCTIONS |
| 47 | ;; | 47 | ;; |
| 48 | ;; * create-repo (backend) | 48 | ;; * create-repo (backend) DONE |
| 49 | ;; * register (files &optional comment) | 49 | ;; * register (files &optional comment) DONE |
| 50 | ;; - responsible-p (file) | 50 | ;; - responsible-p (file) |
| 51 | ;; - receive-file (file rev) | 51 | ;; - receive-file (file rev) |
| 52 | ;; - unregister (file) | 52 | ;; - unregister (file) DONE |
| 53 | ;; * checkin (files comment) | 53 | ;; * checkin (files comment) |
| 54 | ;; * find-revision (file rev buffer) | 54 | ;; * find-revision (file rev buffer) |
| 55 | ;; * checkout (file &optional rev) | 55 | ;; * checkout (file &optional rev) |
| @@ -178,12 +178,13 @@ For backends which dont support it, it is emulated." | |||
| 178 | 178 | ||
| 179 | ;; Check the revision granularity. | 179 | ;; Check the revision granularity. |
| 180 | (should (memq (vc-test--revision-granularity-function backend) | 180 | (should (memq (vc-test--revision-granularity-function backend) |
| 181 | '(file repository))) | 181 | '(file repository))) |
| 182 | 182 | ||
| 183 | ;; Create empty repository. | 183 | ;; Create empty repository. |
| 184 | (make-directory default-directory) | 184 | (make-directory default-directory) |
| 185 | (should (file-directory-p default-directory)) | 185 | (should (file-directory-p default-directory)) |
| 186 | (vc-test--create-repo-function backend)) | 186 | (vc-test--create-repo-function backend) |
| 187 | (should (eq (vc-responsible-backend default-directory) backend))) | ||
| 187 | 188 | ||
| 188 | ;; Save exit. | 189 | ;; Save exit. |
| 189 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) | 190 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) |
| @@ -229,8 +230,7 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 229 | (write-region "bla" nil tmp-name2 nil 'nomessage) | 230 | (write-region "bla" nil tmp-name2 nil 'nomessage) |
| 230 | (should (file-exists-p tmp-name2)) | 231 | (should (file-exists-p tmp-name2)) |
| 231 | (should-not (vc-registered tmp-name2)) | 232 | (should-not (vc-registered tmp-name2)) |
| 232 | (vc-register | 233 | (vc-register (list backend (list tmp-name1 tmp-name2))) |
| 233 | (list backend (list tmp-name1 tmp-name2))) | ||
| 234 | (should (file-exists-p tmp-name1)) | 234 | (should (file-exists-p tmp-name1)) |
| 235 | (should (vc-registered tmp-name1)) | 235 | (should (vc-registered tmp-name1)) |
| 236 | (should (file-exists-p tmp-name2)) | 236 | (should (file-exists-p tmp-name2)) |
| @@ -244,15 +244,14 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 244 | (vc-test--unregister-function backend tmp-name2) | 244 | (vc-test--unregister-function backend tmp-name2) |
| 245 | (should-not (vc-registered tmp-name2))) | 245 | (should-not (vc-registered tmp-name2))) |
| 246 | ;; CVS, SVN, SCCS, SRC and Mtn are not supported. | 246 | ;; CVS, SVN, SCCS, SRC and Mtn are not supported. |
| 247 | (vc-not-supported (message "%s" (error-message-string err)))) | 247 | (vc-not-supported t)) |
| 248 | ;; The files shall still exist. | ||
| 248 | (should (file-exists-p tmp-name1)) | 249 | (should (file-exists-p tmp-name1)) |
| 249 | (should (file-exists-p tmp-name2)))) | 250 | (should (file-exists-p tmp-name2)))) |
| 250 | 251 | ||
| 251 | ;; Save exit. | 252 | ;; Save exit. |
| 252 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) | 253 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) |
| 253 | 254 | ||
| 254 | ;; `vc-state' returns different results for different backends. So we | ||
| 255 | ;; don't check with `should', but print the results for analysis. | ||
| 256 | (defun vc-test--state (backend) | 255 | (defun vc-test--state (backend) |
| 257 | "Check the different states of a file." | 256 | "Check the different states of a file." |
| 258 | 257 | ||
| @@ -261,7 +260,7 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 261 | (file-name-as-directory | 260 | (file-name-as-directory |
| 262 | (expand-file-name | 261 | (expand-file-name |
| 263 | (make-temp-name "vc-test") temporary-file-directory))) | 262 | (make-temp-name "vc-test") temporary-file-directory))) |
| 264 | vc-test--cleanup-hook errors) | 263 | vc-test--cleanup-hook) |
| 265 | 264 | ||
| 266 | (unwind-protect | 265 | (unwind-protect |
| 267 | (progn | 266 | (progn |
| @@ -270,36 +269,64 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 270 | 'vc-test--cleanup-hook | 269 | 'vc-test--cleanup-hook |
| 271 | `(lambda () (delete-directory ,default-directory 'recursive))) | 270 | `(lambda () (delete-directory ,default-directory 'recursive))) |
| 272 | 271 | ||
| 273 | ;; Create empty repository. | 272 | ;; Create empty repository. Check repository state. |
| 274 | (make-directory default-directory) | 273 | (make-directory default-directory) |
| 275 | (vc-test--create-repo-function backend) | 274 | (vc-test--create-repo-function backend) |
| 276 | 275 | ||
| 277 | (message "%s" (vc-state default-directory backend)) | 276 | ;; nil: Hg Mtn RCS |
| 278 | ;(should (eq (vc-state default-directory backend) 'up-to-date)) | 277 | ;; added: Git |
| 278 | ;; unregistered: CVS SCCS SRC | ||
| 279 | ;; up-to-date: Bzr SVN | ||
| 280 | (should (eq (vc-state default-directory) | ||
| 281 | (vc-state default-directory backend))) | ||
| 282 | (should (memq (vc-state default-directory) | ||
| 283 | '(nil added unregistered up-to-date))) | ||
| 279 | 284 | ||
| 280 | (let ((tmp-name (expand-file-name "foo" default-directory))) | 285 | (let ((tmp-name (expand-file-name "foo" default-directory))) |
| 281 | ;; Check for initial state. | 286 | ;; Check state of an empty file. |
| 282 | (message "%s" (vc-state tmp-name backend)) | ||
| 283 | ;(should (eq (vc-state tmp-name backend) 'unregistered)) | ||
| 284 | 287 | ||
| 285 | ;; Write a new file. Check for state. | 288 | ;; nil: Hg Mtn SRC SVN |
| 289 | ;; added: Git | ||
| 290 | ;; unregistered: RCS SCCS | ||
| 291 | ;; up-to-date: Bzr CVS | ||
| 292 | (should (eq (vc-state tmp-name) (vc-state tmp-name backend))) | ||
| 293 | (should (memq (vc-state tmp-name) | ||
| 294 | '(nil added unregistered up-to-date))) | ||
| 295 | |||
| 296 | ;; Write a new file. Check state. | ||
| 286 | (write-region "foo" nil tmp-name nil 'nomessage) | 297 | (write-region "foo" nil tmp-name nil 'nomessage) |
| 287 | (message "%s" (vc-state tmp-name backend)) | ||
| 288 | ;(should (eq (vc-state tmp-name backend) 'unregistered)) | ||
| 289 | 298 | ||
| 290 | ;; Register a file. Check for state. | 299 | ;; nil: Mtn |
| 300 | ;; added: Git | ||
| 301 | ;; unregistered: Hg RCS SCCS SRC SVN | ||
| 302 | ;; up-to-date: Bzr CVS | ||
| 303 | (should (eq (vc-state tmp-name) (vc-state tmp-name backend))) | ||
| 304 | (should (memq (vc-state tmp-name) | ||
| 305 | '(nil added unregistered up-to-date))) | ||
| 306 | |||
| 307 | ;; Register a file. Check state. | ||
| 291 | (vc-register | 308 | (vc-register |
| 292 | (list backend (list (file-name-nondirectory tmp-name)))) | 309 | (list backend (list (file-name-nondirectory tmp-name)))) |
| 293 | (message "%s" (vc-state tmp-name backend)) | ||
| 294 | ;(should (eq (vc-state tmp-name backend) 'added)) | ||
| 295 | 310 | ||
| 296 | ;; Unregister the file. Check for state. | 311 | ;; added: Git Mtn |
| 312 | ;; unregistered: Hg RCS SCCS SRC SVN | ||
| 313 | ;; up-to-date: Bzr CVS | ||
| 314 | (should (eq (vc-state tmp-name) (vc-state tmp-name backend))) | ||
| 315 | (should (memq (vc-state tmp-name) '(added unregistered up-to-date))) | ||
| 316 | |||
| 317 | ;; Unregister the file. Check state. | ||
| 297 | (condition-case nil | 318 | (condition-case nil |
| 298 | (progn | 319 | (progn |
| 299 | (vc-test--unregister-function backend tmp-name) | 320 | (vc-test--unregister-function backend tmp-name) |
| 300 | (message "%s" (vc-state tmp-name backend)) | 321 | |
| 301 | );(should (eq (vc-state tmp-name backend) 'unregistered))) | 322 | ;; added: Git |
| 302 | (vc-not-supported (message "%s" 'unsupported))))) | 323 | ;; unregistered: Hg |
| 324 | ;; unsupported: CVS Mtn SCCS SRC SVN | ||
| 325 | ;; up-to-date: Bzr | ||
| 326 | (should (eq (vc-state tmp-name) (vc-state tmp-name backend))) | ||
| 327 | (should (memq (vc-state tmp-name) | ||
| 328 | '(added unregistered up-to-date)))) | ||
| 329 | (vc-not-supported t)))) | ||
| 303 | 330 | ||
| 304 | ;; Save exit. | 331 | ;; Save exit. |
| 305 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) | 332 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) |
| @@ -312,7 +339,7 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 312 | (file-name-as-directory | 339 | (file-name-as-directory |
| 313 | (expand-file-name | 340 | (expand-file-name |
| 314 | (make-temp-name "vc-test") temporary-file-directory))) | 341 | (make-temp-name "vc-test") temporary-file-directory))) |
| 315 | vc-test--cleanup-hook errors) | 342 | vc-test--cleanup-hook) |
| 316 | 343 | ||
| 317 | (unwind-protect | 344 | (unwind-protect |
| 318 | (progn | 345 | (progn |
| @@ -321,40 +348,141 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 321 | 'vc-test--cleanup-hook | 348 | 'vc-test--cleanup-hook |
| 322 | `(lambda () (delete-directory ,default-directory 'recursive))) | 349 | `(lambda () (delete-directory ,default-directory 'recursive))) |
| 323 | 350 | ||
| 324 | ;; Create empty repository. | 351 | ;; Create empty repository. Check working revision of |
| 352 | ;; repository, should be nil. | ||
| 325 | (make-directory default-directory) | 353 | (make-directory default-directory) |
| 326 | (vc-test--create-repo-function backend) | 354 | (vc-test--create-repo-function backend) |
| 327 | 355 | ||
| 356 | ;; nil: CVS Mtn RCS SCCS | ||
| 357 | ;; "0": Bzr Hg SRC SVN | ||
| 358 | ;; "master": Git | ||
| 359 | (should (eq (vc-working-revision default-directory) | ||
| 360 | (vc-working-revision default-directory backend))) | ||
| 328 | (should | 361 | (should |
| 329 | (member | 362 | (member |
| 330 | (vc-working-revision default-directory backend) '("0" "master"))) | 363 | (vc-working-revision default-directory) '(nil "0" "master"))) |
| 331 | 364 | ||
| 332 | (let ((tmp-name (expand-file-name "foo" default-directory))) | 365 | (let ((tmp-name (expand-file-name "foo" default-directory))) |
| 333 | ;; Check for initial state, should be nil until it's registered. | 366 | ;; Check initial working revision, should be nil until |
| 334 | ;; Don't pass the backend explicitly, otherwise some | 367 | ;; it's registered. |
| 335 | ;; implementations return non-nil. | 368 | |
| 336 | (should (null (vc-working-revision tmp-name))) | 369 | ;; nil: CVS Mtn RCS SCCS SVN |
| 370 | ;; "0": Bzr Hg SRC | ||
| 371 | ;; "master": Git | ||
| 372 | (should (eq (vc-working-revision tmp-name) | ||
| 373 | (vc-working-revision tmp-name backend))) | ||
| 374 | (should | ||
| 375 | (member (vc-working-revision tmp-name) '(nil "0" "master"))) | ||
| 337 | 376 | ||
| 338 | ;; Write a new file. Check state. | 377 | ;; Write a new file. Check working revision. |
| 339 | (write-region "foo" nil tmp-name nil 'nomessage) | 378 | (write-region "foo" nil tmp-name nil 'nomessage) |
| 340 | (should (null (vc-working-revision tmp-name))) | ||
| 341 | 379 | ||
| 342 | ;; Register a file. Check for state. | 380 | ;; nil: CVS Mtn RCS SCCS SVN |
| 381 | ;; "0": Bzr Hg SRC | ||
| 382 | ;; "master": Git | ||
| 383 | (should (eq (vc-working-revision tmp-name) | ||
| 384 | (vc-working-revision tmp-name backend))) | ||
| 385 | (should | ||
| 386 | (member (vc-working-revision tmp-name) '(nil "0" "master"))) | ||
| 387 | |||
| 388 | ;; Register a file. Check working revision. | ||
| 343 | (vc-register | 389 | (vc-register |
| 344 | (list backend (list (file-name-nondirectory tmp-name)))) | 390 | (list backend (list (file-name-nondirectory tmp-name)))) |
| 345 | ;; FIXME: Don't pass the backend. Emacs should be able to | 391 | |
| 346 | ;; figure it out. | 392 | ;; nil: Mtn RCS SCCS |
| 393 | ;; "0": Bzr CVS Hg SRC SVN | ||
| 394 | ;; "master": Git | ||
| 395 | (should (eq (vc-working-revision tmp-name) | ||
| 396 | (vc-working-revision tmp-name backend))) | ||
| 347 | (should | 397 | (should |
| 348 | (member (vc-working-revision tmp-name backend) '("0" "master"))) | 398 | (member (vc-working-revision tmp-name) '(nil "0" "master"))) |
| 349 | 399 | ||
| 350 | ;; Unregister the file. Check for working-revision. | 400 | ;; Unregister the file. Check working revision. |
| 351 | (condition-case nil | 401 | (condition-case nil |
| 352 | (progn | 402 | (progn |
| 353 | (vc-test--unregister-function backend tmp-name) | 403 | (vc-test--unregister-function backend tmp-name) |
| 404 | |||
| 405 | ;; nil: RCS | ||
| 406 | ;; "0": Bzr Hg | ||
| 407 | ;; "master": Git | ||
| 408 | ;; unsupported: CVS Mtn SCCS SRC SVN | ||
| 409 | (should (eq (vc-working-revision tmp-name) | ||
| 410 | (vc-working-revision tmp-name backend))) | ||
| 354 | (should | 411 | (should |
| 355 | (member | 412 | (member |
| 356 | (vc-working-revision tmp-name backend) '("0" "master")))) | 413 | (vc-working-revision tmp-name) '(nil "0" "master")))) |
| 357 | (vc-not-supported (message "%s" 'unsupported))))) | 414 | (vc-not-supported t)))) |
| 415 | |||
| 416 | ;; Save exit. | ||
| 417 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) | ||
| 418 | |||
| 419 | (defun vc-test--checkout-model (backend) | ||
| 420 | "Check the checkout model of a repository." | ||
| 421 | |||
| 422 | (let ((vc-handled-backends `(,backend)) | ||
| 423 | (default-directory | ||
| 424 | (file-name-as-directory | ||
| 425 | (expand-file-name | ||
| 426 | (make-temp-name "vc-test") temporary-file-directory))) | ||
| 427 | vc-test--cleanup-hook) | ||
| 428 | |||
| 429 | (unwind-protect | ||
| 430 | (progn | ||
| 431 | ;; Cleanup. | ||
| 432 | (add-hook | ||
| 433 | 'vc-test--cleanup-hook | ||
| 434 | `(lambda () (delete-directory ,default-directory 'recursive))) | ||
| 435 | |||
| 436 | ;; Create empty repository. Check repository checkout model. | ||
| 437 | (make-directory default-directory) | ||
| 438 | (vc-test--create-repo-function backend) | ||
| 439 | |||
| 440 | ;; Surprisingly, none of the backends returns 'announce. | ||
| 441 | ;; nil: RCS | ||
| 442 | ;; implicit: Bzr CVS Git Hg Mtn SRC SVN | ||
| 443 | ;; locking: SCCS | ||
| 444 | (should (memq (vc-checkout-model backend default-directory) | ||
| 445 | '(announce implicit locking))) | ||
| 446 | |||
| 447 | (let ((tmp-name (expand-file-name "foo" default-directory))) | ||
| 448 | ;; Check checkout model of an empty file. | ||
| 449 | |||
| 450 | ;; nil: RCS | ||
| 451 | ;; implicit: Bzr CVS Git Hg Mtn SRC SVN | ||
| 452 | ;; locking: SCCS | ||
| 453 | (should (memq (vc-checkout-model backend tmp-name) | ||
| 454 | '(announce implicit locking))) | ||
| 455 | |||
| 456 | ;; Write a new file. Check checkout model. | ||
| 457 | (write-region "foo" nil tmp-name nil 'nomessage) | ||
| 458 | |||
| 459 | ;; nil: RCS | ||
| 460 | ;; implicit: Bzr CVS Git Hg Mtn SRC SVN | ||
| 461 | ;; locking: SCCS | ||
| 462 | (should (memq (vc-checkout-model backend tmp-name) | ||
| 463 | '(announce implicit locking))) | ||
| 464 | |||
| 465 | ;; Register a file. Check checkout model. | ||
| 466 | (vc-register | ||
| 467 | (list backend (list (file-name-nondirectory tmp-name)))) | ||
| 468 | |||
| 469 | ;; nil: RCS | ||
| 470 | ;; implicit: Bzr CVS Git Hg Mtn SRC SVN | ||
| 471 | ;; locking: SCCS | ||
| 472 | (should (memq (vc-checkout-model backend tmp-name) | ||
| 473 | '(announce implicit locking))) | ||
| 474 | |||
| 475 | ;; Unregister the file. Check checkout model. | ||
| 476 | (condition-case nil | ||
| 477 | (progn | ||
| 478 | (vc-test--unregister-function backend tmp-name) | ||
| 479 | |||
| 480 | ;; nil: RCS | ||
| 481 | ;; implicit: Bzr Git Hg | ||
| 482 | ;; unsupported: CVS Mtn SCCS SRC SVN | ||
| 483 | (should (memq (vc-checkout-model backend tmp-name) | ||
| 484 | '(announce implicit locking)))) | ||
| 485 | (vc-not-supported t)))) | ||
| 358 | 486 | ||
| 359 | ;; Save exit. | 487 | ;; Save exit. |
| 360 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) | 488 | (ignore-errors (run-hooks 'vc-test--cleanup-hook))))) |
| @@ -394,11 +522,11 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 394 | (defun vc-test--mtn-enabled () | 522 | (defun vc-test--mtn-enabled () |
| 395 | (executable-find vc-mtn-program)) | 523 | (executable-find vc-mtn-program)) |
| 396 | 524 | ||
| 525 | ;; Obsoleted. | ||
| 397 | (defvar vc-arch-program) | 526 | (defvar vc-arch-program) |
| 398 | (defun vc-test--arch-enabled () | 527 | (defun vc-test--arch-enabled () |
| 399 | (executable-find vc-arch-program)) | 528 | (executable-find vc-arch-program)) |
| 400 | 529 | ||
| 401 | |||
| 402 | ;; There are too many failed test cases yet. We suppress them on hydra. | 530 | ;; There are too many failed test cases yet. We suppress them on hydra. |
| 403 | (if (getenv "NIX_STORE") | 531 | (if (getenv "NIX_STORE") |
| 404 | (ert-deftest vc-test () | 532 | (ert-deftest vc-test () |
| @@ -415,7 +543,8 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 415 | 543 | ||
| 416 | (ert-deftest | 544 | (ert-deftest |
| 417 | ,(intern (format "vc-test-%s00-create-repo" backend-string)) () | 545 | ,(intern (format "vc-test-%s00-create-repo" backend-string)) () |
| 418 | ,(format "Check `vc-create-repo' for the %s backend." backend-string) | 546 | ,(format "Check `vc-create-repo' for the %s backend." |
| 547 | backend-string) | ||
| 419 | (vc-test--create-repo ',backend)) | 548 | (vc-test--create-repo ',backend)) |
| 420 | 549 | ||
| 421 | (ert-deftest | 550 | (ert-deftest |
| @@ -444,14 +573,27 @@ For backends which dont support it, `vc-not-supported' is signalled." | |||
| 444 | 573 | ||
| 445 | (ert-deftest | 574 | (ert-deftest |
| 446 | ,(intern (format "vc-test-%s03-working-revision" backend-string)) () | 575 | ,(intern (format "vc-test-%s03-working-revision" backend-string)) () |
| 447 | ,(format "Check `vc-working-revision' for the %s backend." backend-string) | 576 | ,(format "Check `vc-working-revision' for the %s backend." |
| 577 | backend-string) | ||
| 578 | (skip-unless | ||
| 579 | (ert-test-passed-p | ||
| 580 | (ert-test-most-recent-result | ||
| 581 | (ert-get-test | ||
| 582 | ',(intern | ||
| 583 | (format "vc-test-%s01-register" backend-string)))))) | ||
| 584 | (vc-test--working-revision ',backend)) | ||
| 585 | |||
| 586 | (ert-deftest | ||
| 587 | ,(intern (format "vc-test-%s04-checkout-model" backend-string)) () | ||
| 588 | ,(format "Check `vc-checkout-model' for the %s backend." | ||
| 589 | backend-string) | ||
| 448 | (skip-unless | 590 | (skip-unless |
| 449 | (ert-test-passed-p | 591 | (ert-test-passed-p |
| 450 | (ert-test-most-recent-result | 592 | (ert-test-most-recent-result |
| 451 | (ert-get-test | 593 | (ert-get-test |
| 452 | ',(intern | 594 | ',(intern |
| 453 | (format "vc-test-%s01-register" backend-string)))))) | 595 | (format "vc-test-%s01-register" backend-string)))))) |
| 454 | (vc-test--working-revision ',backend))))))) | 596 | (vc-test--checkout-model ',backend))))))) |
| 455 | 597 | ||
| 456 | (provide 'vc-tests) | 598 | (provide 'vc-tests) |
| 457 | ;;; vc-tests.el ends here | 599 | ;;; vc-tests.el ends here |