Subject: Add tests for buffer-base-buffer function

From: Shanavas M <[email-masked]>
Date: Thu, 22 Mar 2018 12:28:39 +0300

This patch adds two tests for buffer-base-buffer function

--

Shanavas M

>From a8db56897545f6414f180a35d51ea8e17e15d525 Mon Sep 17 00:00:00 2001
From: Shanavas M <[email-masked]>
Date: Thu, 22 Mar 2018 12:20:22 +0300
Subject: [PATCH] Add tests for buffer-base-buffer function

---
 test/src/buffer-tests.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index f9c477fbfd..170e3a5656 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -50,4 +50,13 @@
                             (progn (get-buffer-create "nil")
                                    (generate-new-buffer-name "nil")))))
 
+(ert-deftest test-buffer-base-buffer-indirect ()
+  (let* ((base (get-buffer-create "base")
+          (ind-buf (make-indirect-buffer base "indbuf"))))
+    (should (eq (buffer-base-buffer ind-buf) base))))
+
+(ert-deftest test-buffer-base-buffer-non-indirect ()
+  (let ((buf (get-buffer-create "buf")))
+    (should (eq (buffer-base-buffer buf) nil))))
+
 ;;; buffer-tests.el ends here
-- 
2.11.0