diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2025-05-12 23:58:22 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2025-05-13 00:03:17 +0200 |
| commit | cfe89a74a63e8205782b7217ae01145b54a27fcc (patch) | |
| tree | 45ad4c05cf9d1d0de1e60d59a96bcb59d9cf34f1 /compat-tests.el | |
| parent | 7d6be88c8664de35f506aac960a6c11225599b6b (diff) | |
compat-31: New function hash-table-contains-p
Diffstat (limited to 'compat-tests.el')
| -rw-r--r-- | compat-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat-tests.el b/compat-tests.el index 5d70ac5..8bfc502 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -3012,6 +3012,14 @@ (with-temp-buffer (should-equal (take 3 (widget-create 'key)) '(key :value "")))) +(ert-deftest compat-hash-table-contains-p () + (let ((h (make-hash-table :test #'equal))) + (puthash :foo t h) + (should (hash-table-contains-p :foo h)) + (should-not (hash-table-contains-p :bar h)) + (should-not (hash-table-contains-p 'missing h)) + (should-not (hash-table-contains-p '#:missing h)))) + (ert-deftest compat-copy-tree () ;; Adapted from Emacs /test/lisp/subr-tests.el ;; Check that values other than conses, vectors and records are |
