org-test: Fix <point> feature
commitd01d22b74f3257a362411ade9a406f3bb00edb0e
authorYork Zhao <gtdplatform@gmail.com>
Wed, 9 Apr 2014 17:39:16 +0000 (9 13:39 -0400)
committerNicolas Goaziou <n.goaziou@gmail.com>
Thu, 10 Apr 2014 09:52:44 +0000 (10 11:52 +0200)
tree60c6e103d001feaf45022180f08a1058e510337a
parenta768cf045d5fd48d853625bc0f2987897a68ba88
org-test: Fix <point> feature

* testing/org-test.el (org-test-with-temp-text): Fix point position.

According to the docstring, if the string "<point>" appears in TEXT
then the string "<point>" is removed and point is placed there. The
problem was that after string "<point>" was removed, the point
was *not* placed at the position of the removed text, rather, it was
placed one character before that position which is wrong. The reason
is that Emacs buffer position is a number started from 1, instead of
0, in other words, the value of `(point-min)' is 1 not 0. The problem
is addressed by adding 1 to the calculated position.

TINYCHANGE
testing/org-test.el