1 ;; Tests for operations on list items
3 (add-to-list 'load-path
".")
7 (ert-deftest items-asserts
()
8 "Check some assertions."
9 (should (equal ert-Buf-point-char
"\^@"))
10 (should (equal ert-Buf-mark-char
"\^?"))
13 (ert-deftest rst-convert-bullets-to-enumeration
()
14 "Tests `rst-convert-bullets-to-enumeration'."
15 (should (ert-equal-buffer
16 (rst-convert-bullets-to-enumeration)
23 Another normal paragraph.
32 Another normal paragraph.
35 (should (ert-equal-buffer
36 (rst-convert-bullets-to-enumeration)
43 \^@Another normal paragraph.
52 \^@Another normal paragraph.
55 (should (ert-equal-buffer
56 (rst-convert-bullets-to-enumeration)
67 \^@Another normal paragraph.
81 \^@Another normal paragraph.
86 (ert-deftest rst-convert-bullets-to-enumeration-BUGS
()
87 "Exposes bugs in `rst-convert-bullets-to-enumeration'."
88 :expected-result
:failed
;; These are bugs
89 (should (ert-equal-buffer
90 (rst-convert-bullets-to-enumeration)
101 Another normal paragraph.
104 "\^@Normal paragraph.
114 Another normal paragraph.
119 (ert-deftest rst-insert-list-continue
()
120 "Tests `rst-insert-list' when continuing a list."
121 (should (ert-equal-buffer
126 (should (ert-equal-buffer
131 (should (ert-equal-buffer
136 (should (ert-equal-buffer
139 - A deeper hyphen bullet\^@\n"
141 - A deeper hyphen bullet
143 (should (ert-equal-buffer
150 (should (ert-equal-buffer
155 (should (ert-equal-buffer
160 (should (ert-equal-buffer
165 (should (ert-equal-buffer
170 (should (ert-equal-buffer
175 (should (ert-equal-buffer
180 (should (ert-equal-buffer
187 (should (ert-equal-buffer
192 (should (ert-equal-buffer
201 (ert-deftest rst-insert-list-continue-BUGS
()
202 "Exposes bugs in `rst-insert-list-continue'."
203 :expected-result
:failed
;; These are bugs
204 (should (ert-equal-buffer
214 (ert-deftest rst-insert-list-new
()
215 "Tests `rst-insert-list' when inserting a new list."
216 (should (ert-equal-buffer
220 (should (ert-equal-buffer
224 (should (ert-equal-buffer
228 (should (ert-equal-buffer
231 "5) \^@\n" '("1)" 5)))
232 (should (ert-equal-buffer
235 "(i) \^@\n" '("(i)" "")))
236 (should (ert-equal-buffer
239 "IV. \^@\n" '("I." 4)))
240 (should (ert-equal-buffer
245 IV. \^@\n" '("I." 4)))
246 (should (ert-equal-buffer
252 IV. \^@\n" '("I." 4)))
253 (should (ert-equal-buffer
260 IV. \^@\n" '("I." 4)))