All Downloads are FREE. Search and download functionalities are using the official Maven repository.

build.tools.editors.emacs.tests.movement.el Maven / Gradle / Ivy

There is a newer version: 2.4
Show newest version
;; Tests for various movement commands

(add-to-list 'load-path ".")
(load "ert-support" nil t)

(defun fwd-para ()
  "Wrapper to call `forward-paragraph'."
  (rst-mode)
  (forward-paragraph))

(ert-deftest forward-paragraph ()
  "Tests for `forward-paragraph'."
  (should (equal-buffer-return
	   '(fwd-para)
	   "
:Field: Content
\^@
  More content
  over several

  * An item
    with multi
"
	   "
:Field: Content

  More content
  over several
\^@
  * An item
    with multi
"
	   0
	   ))


  (should (equal-buffer-return
	   '(fwd-para)
	   "\^@
This is
a short
para"
	   "
This is
a short
para\^@"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "\^@
This is
a short
para
"
	   "
This is
a short
para
\^@"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "\^@
This is
a short
para

"
	   "
This is
a short
para
\^@
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "\^@
This is
a short
para


"
	   "
This is
a short
para
\^@

"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
\^@This is
a short
para

"
	   "
This is
a short
para
\^@
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
This is
a short
\^@para

"
	   "
This is
a short
para
\^@
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
This is
a short
\^@para

"
	   "
This is
a short
para
\^@
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
This is
\^@a short
  para

"
	   "
This is
a short
  para
\^@
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
This is
a short
\^@para

This is
a short
para

"
	   "
This is
a short
para
\^@
This is
a short
para

"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
\^@* An item

* Another item
"
	   "
* An item
\^@
* Another item
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
\^@* An item
* Another item
"
	   "
* An item
\^@* Another item
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
\^@:Field: Content

  More content
  over several

  * An item
    with multi
"
	   "
:Field: Content
\^@
  More content
  over several

  * An item
    with multi
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
:Field: Content
\^@
  More content
  over several

  * An item
    with multi
"
	   "
:Field: Content

  More content
  over several
\^@
  * An item
    with multi
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
:Field: Content

  More content
  over several
\^@
  * An item
    with multi
"
	   "
:Field: Content

  More content
  over several

  * An item
    with multi
\^@"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "\^@
.. |s| d::
  :F: Content

    More content
    over several
  * An item
    with multi
"
	   "
.. |s| d::
\^@  :F: Content

    More content
    over several
  * An item
    with multi
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
.. |s| d::
\^@  :F: Content

    More content
    over several
  * An item
    with multi
"
	   "
.. |s| d::
  :F: Content
\^@
    More content
    over several
  * An item
    with multi
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
.. |s| d::
  :F: Content
\^@
    More content
    over several
  * An item
    with multi
"
	   "
.. |s| d::
  :F: Content

    More content
    over several
\^@  * An item
    with multi
"
	   0
	   ))
  (should (equal-buffer-return
	   '(fwd-para)
	   "
.. |s| d::
  :F: Content

    More content
    over several
\^@  * An item
    with multi
"
	   "
.. |s| d::
  :F: Content

    More content
    over several
  * An item
    with multi
\^@"
	   0
	   ))
  )




© 2015 - 2024 Weber Informatics LLC | Privacy Policy