Mercurial > hg > xemacs-beta
comparison tests/automated/database-tests.el @ 388:aabb7f5b1c81 r21-2-9
Import from CVS: tag r21-2-9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:09:42 +0200 |
parents | 8626e4521993 |
children | 1f50e6fe4f3f |
comparison
equal
deleted
inserted
replaced
387:f892a9d0bb8d | 388:aabb7f5b1c81 |
---|---|
27 ;;; Commentary: | 27 ;;; Commentary: |
28 | 28 |
29 ;;; Test database functionality | 29 ;;; Test database functionality |
30 ;;; See test-harness.el | 30 ;;; See test-harness.el |
31 | 31 |
32 (condition-case err | 32 (condition-case nil |
33 (require 'test-harness) | 33 (require 'test-harness) |
34 (file-error | 34 (file-error |
35 (when (and (boundp 'load-file-name) (stringp load-file-name)) | 35 (when (and (boundp 'load-file-name) (stringp load-file-name)) |
36 (push (file-name-directory load-file-name) load-path) | 36 (push (file-name-directory load-file-name) load-path) |
37 (require 'test-harness)))) | 37 (require 'test-harness)))) |
51 (condition-case nil (delete-file fn) (file-error nil)))))) | 51 (condition-case nil (delete-file fn) (file-error nil)))))) |
52 | 52 |
53 (let ((filename (expand-file-name "test-harness" (temp-directory)))) | 53 (let ((filename (expand-file-name "test-harness" (temp-directory)))) |
54 | 54 |
55 (dolist (fn (list filename (concat filename ".db"))) | 55 (dolist (fn (list filename (concat filename ".db"))) |
56 (condition-case nil (delete-file fn) (file-error nil))) | 56 (ignore-file-errors (delete-file fn))) |
57 | 57 |
58 (dolist (db-type `(dbm berkeley-db)) | 58 (dolist (db-type `(dbm berkeley-db)) |
59 (when (featurep db-type) | 59 (when (featurep db-type) |
60 (princ "\n") | 60 (princ "\n") |
61 (test-database (open-database filename db-type)))) | 61 (test-database (open-database filename db-type)))) |