[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 10f5f43 1/2: Add tests for buffer-base-buffer funct
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 10f5f43 1/2: Add tests for buffer-base-buffer function (Bug#30905) |
Date: |
Wed, 11 Apr 2018 21:18:25 -0400 (EDT) |
branch: master
commit 10f5f4361b9783f1cc4a683cca31ab3192fe179d
Author: Shanavas M <address@hidden>
Commit: Noam Postavsky <address@hidden>
Add tests for buffer-base-buffer function (Bug#30905)
* test/src/buffer-tests.el (test-buffer-base-buffer-indirect)
(test-buffer-base-buffer-non-indirect): New tests for
`buffer-base-buffer'.
---
test/src/buffer-tests.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index f9c477f..d115e66 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -50,4 +50,14 @@ with parameters from the *Messages* buffer modification."
(progn (get-buffer-create "nil")
(generate-new-buffer-name "nil")))))
+(ert-deftest test-buffer-base-buffer-indirect ()
+ (with-temp-buffer
+ (let* ((ind-buf-name (generate-new-buffer-name "indbuf"))
+ (ind-buf (make-indirect-buffer (current-buffer) ind-buf-name)))
+ (should (eq (buffer-base-buffer ind-buf) (current-buffer))))))
+
+(ert-deftest test-buffer-base-buffer-non-indirect ()
+ (with-temp-buffer
+ (should (eq (buffer-base-buffer (current-buffer)) nil))))
+
;;; buffer-tests.el ends here