File: m-buffer-at-test.el

package info (click to toggle)
m-buffer-el 0.15-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: lisp: 1,189; makefile: 52
file content (39 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(require 'm-buffer-at)

(ert-deftest m-buffer-at-eolp-1()
  (should
   (with-temp-buffer
     (insert "hello")
     (m-buffer-at-eolp (point-marker)))))

(ert-deftest m-buffer-at-eolp-2 ()
  (should
   (with-temp-buffer
     (insert "hello")
     (m-buffer-at-eolp
      (current-buffer)
      (point)))))

(ert-deftest m-buffer-at-eolp-3 ()
  (should-not
   (with-temp-buffer
     (insert "hello")
     (goto-char (point-min))
     (m-buffer-at-eolp (point-marker)))))

(ert-deftest m-buffer-at-eolp-4 ()
  (should-not
   (with-temp-buffer
     (insert "hello")
     (goto-char (point-min))
     (m-buffer-at-eolp
      (current-buffer)
      (point)))))

(ert-deftest m-buffer-string ()
  (should
   (string=
    "hello"
    (with-temp-buffer
      (insert "hello")
      (m-buffer-at-string (current-buffer))))))