branch: externals/topspace commit 27301e8c5a617a2259750fe44d543bb4b8c5bd83 Author: Trevor Pogue <pogu...@mcmaster.ca> Commit: Trevor Pogue <pogu...@mcmaster.ca>
Update tests - Expected values in test assertions are hard-coded and currently rely on the contents of the topspace.el file in some cases. Since the previous commit altered topspace.el in that specific way, some of the hard-coded values had to be updated for the tests to pass. --- test/topspace-test.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/topspace-test.el b/test/topspace-test.el index 853f34dac1..258d3d6cf8 100644 --- a/test/topspace-test.el +++ b/test/topspace-test.el @@ -200,10 +200,10 @@ by default" ;; :to-equal ;; (line-number-at-pos (point-max))))) - (it "can count lines end is larger `window-end'" + (it "can count lines" (set-window-start (selected-window) 300) (expect (round (topspace--count-lines (window-start) - (1+ (topspace--window-end)))) + (topspace--window-end))) :to-equal (count-screen-lines (window-start) (topspace--window-end))) (set-window-start (selected-window) 1)) @@ -211,15 +211,15 @@ by default" (it "can count lines if start is larger than end" (set-window-start (selected-window) 300) (expect (round (topspace--count-lines 401 201)) - :to-equal 4) + :to-equal 3) (expect (round (topspace--count-lines 201 401)) - :to-equal 4) + :to-equal 3) (set-window-start (selected-window) 1)) (it "can count lines if window-absolute-pixel-position returns nil" (expect (round (round (topspace--count-lines 201 401))) :to-equal - 4))) + 3))) (describe "topspace--correct-height"