diff options
| author | Artur Malabarba | 2015-11-07 12:45:18 +0000 |
|---|---|---|
| committer | Artur Malabarba | 2015-11-10 13:04:30 +0000 |
| commit | cbaa04014e0c9efdfc6393bccde0e6579b5d7051 (patch) | |
| tree | a0fc99cbe4225fc9ff5b5ed04fd5f07441e9cbc8 /test | |
| parent | cbc51211f9e4f8f3d4b8a1feaa6cbfd2fd4ac1ca (diff) | |
| download | emacs-cbaa04014e0c9efdfc6393bccde0e6579b5d7051.tar.gz emacs-cbaa04014e0c9efdfc6393bccde0e6579b5d7051.zip | |
* lisp/emacs-lisp/map.el (map-merge-with): New function
* test/automated/map-tests.el (test-map-merge-with): New test
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/map-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/automated/map-tests.el b/test/automated/map-tests.el index 8693415a784..1a759b523a5 100644 --- a/test/automated/map-tests.el +++ b/test/automated/map-tests.el | |||
| @@ -320,5 +320,12 @@ Evaluate BODY for each created map. | |||
| 320 | (should (= b 2)) | 320 | (should (= b 2)) |
| 321 | (should (null c)))) | 321 | (should (null c)))) |
| 322 | 322 | ||
| 323 | (ert-deftest test-map-merge-with () | ||
| 324 | (should (equal (map-merge-with 'list #'+ | ||
| 325 | '((1 . 2)) | ||
| 326 | '((1 . 3) (2 . 4)) | ||
| 327 | '((1 . 1) (2 . 5) (3 . 0))) | ||
| 328 | '((3 . 0) (2 . 9) (1 . 6))))) | ||
| 329 | |||
| 323 | (provide 'map-tests) | 330 | (provide 'map-tests) |
| 324 | ;;; map-tests.el ends here | 331 | ;;; map-tests.el ends here |