Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pgn-at-pos test for point-min, with new value #209

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 10 additions & 6 deletions ert-tests/pygn-mode-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -1996,13 +1996,15 @@

;;; pygn-mode-pgn-at-pos

;; (ert-deftest pygn-mode-pgn-at-pos-01 nil
;; "Test `pygn-mode-pgn-at-pos' from the first position (a corner case)."
;; (pygn-mode-test-with-file "test-01.pgn"
;; (should (equal
;; "[Event \"?\"]\n"
;; (pygn-mode-pgn-at-pos (point-min))))))
(ert-deftest pygn-mode-pgn-at-pos-01 nil
"Test `pygn-mode-pgn-at-pos' from the first position (a corner case)."
(pygn-mode-test-with-file "test-01.pgn"
(should (equal
"[Event \"?\"]\n[Site \"?\"]\n[Date \"????.??.??\"]\n[Round \"?\"]\n[White \"?\"]\n[Black \"?\"]\n[Result \"*\"]\n[SetUp \"1\"]\n[FEN \"r1bR2Q1/ppp3pp/4p1k1/2b1P1n1/1np1q3/5N2/PPP3PP/5R1K w - - 2 18\"]\n\n*\n"
(pygn-mode-pgn-at-pos (point-min))))))

;; TODO temporarily disabled
;;
;; (ert-deftest pygn-mode-pgn-at-pos-02 nil
;; "Test `pygn-mode-pgn-at-pos' string from every move-start position (test-01.pgn)."
;; (pygn-mode-test-with-file "test-01.pgn"
Expand Down Expand Up @@ -2049,6 +2051,8 @@
fen-for-move)))
(setq last-pos (1- move-pos)))))))

;; TODO temporarily disabled
;;
;; (ert-deftest pygn-mode-pgn-at-pos-05 nil
;; "Test `pygn-mode-pgn-at-pos' string from every move-start position (test-02.pgn)."
;; (pygn-mode-test-with-file "test-02.pgn"
Expand Down
4 changes: 2 additions & 2 deletions pygn-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ ignore the bundled library and use only the system `$PYTHONPATH'."
"Buffer to which the `pygn-mode' server process is associated.")

(defvar pygn-mode--server-receive-every-seconds 0.01
"How often `pygn-mode--server-receive' should check the server for output when polling.")
"How often `pygn-mode--server-receive' should check for output when polling.")

(defvar pygn-mode--server-receive-max-seconds 0.5
"The maximum amount of time `pygn-mode--server-receive' should check the server for output when polling.")
"Max time `pygn-mode--server-receive' should check for output when polling.")

(defvar pygn-mode-annotation-names
(let ((names (make-hash-table :test 'equal)))
Expand Down