@@ -461,6 +461,7 @@ Match a string in the second cell."
461461
462462(ert-deftest hyrolo-tests--fgrep-move-test ()
463463 " Verify different move commands after `hyrolo-fgrep' ."
464+ :expected-result :failed
464465 (let* ((kotl-file1 (hyrolo-tests--gen-kotl-outline " heading" " foo bar" 1 ))
465466 (kotl-file2 (hyrolo-tests--gen-kotl-outline " heading" " foo bar" 1 ))
466467 (hyrolo-file-list (list kotl-file1 kotl-file2))
@@ -483,8 +484,37 @@ Match a string in the second cell."
483484 (execute-kbd-macro (kbd " n" ))
484485 (should (eobp )))
485486
487+ (ert-info (" With hidden first header move up using ?p" )
488+ (execute-kbd-macro (kbd " p" ))
489+ (should (looking-at-p h1a_str))
490+ (execute-kbd-macro (kbd " p" ))
491+ (should (looking-at-p h1_str))
492+ (execute-kbd-macro (kbd " p" ))
493+ (should (looking-at-p " ===" ))
494+ (execute-kbd-macro (kbd " p" ))
495+ (should (looking-at-p " ===" ))
496+ (should (bobp )))
497+
498+ (ert-info (" With hidden first header move down using ?f" )
499+ (should (looking-at-p " ===" ))
500+ (execute-kbd-macro (kbd " f" ))
501+ (should (looking-at-p " ===" ))
502+ (execute-kbd-macro (kbd " f" ))
503+ (should (looking-at-p h1_str))
504+ (let ((err (should-error (execute-kbd-macro (kbd " f" )))))
505+ (should (string-match-p " No following same-level heading/header" (cadr err)))))
506+
507+ (ert-info (" With hidden first header move up using ?b" )
508+ (execute-kbd-macro (kbd " b" ))
509+ (should (looking-at-p " ===" ))
510+ (execute-kbd-macro (kbd " b" ))
511+ (should (looking-at-p " ===" ))
512+ (should (bobp ))
513+ (let ((err (should-error (execute-kbd-macro (kbd " b" )))))
514+ (should-not (equal '(void-function nil ) err)))) ; FIXME: No error message but void-function!?
515+
486516 (outline-show-all)
487- ( goto-char ( point-min ))
517+
488518 (ert-info (" Move down using ?n" )
489519 (should (looking-at-p " ===" ))
490520 (execute-kbd-macro (kbd " n" ))
0 commit comments