[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode 5b58248ab2 2/2: Merge pull request #111 from yos
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode 5b58248ab2 2/2: Merge pull request #111 from yoshiki/add-test-110 |
Date: |
Tue, 21 Nov 2023 22:00:55 -0500 (EST) |
branch: elpa/yaml-mode
commit 5b58248ab255dff6cfa4c4057a191bc4446ee5b6
Merge: aa7f04d8aa 9fb85886cc
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #111 from yoshiki/add-test-110
Add an unit test for moving pages
---
test/yaml-mode-test.el | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/test/yaml-mode-test.el b/test/yaml-mode-test.el
index 0ea659c027..43f75477c0 100644
--- a/test/yaml-mode-test.el
+++ b/test/yaml-mode-test.el
@@ -174,6 +174,30 @@ Detail: https://github.com/yoshiki/yaml-mode/issues/96"
font-lock-constant-face
nil)))
+(ert-deftest moving/page-navigation ()
+ "Moving page by page delimiters.
+Detail: https://github.com/yoshiki/yaml-mode/pull/110"
+ (yaml-test-string "
+---
+at: 2001-08-12 09:25:00.00 Z
+type: GET
+HTTP: '1.0'
+url: '/index.html'
+--- %YAML:1.0
+at: 2001-08-12 09:25:10.00 Z
+type: GET
+HTTP: '1.0'
+url: '/toc.html'
+"
+ ;; NOTE forward-page/backward behavior is different between older Emacs(<
28) and newer ones
+ ;; when the cursor is on the page delimiter
+ (forward-page)
+ (should (= (line-number-at-pos) 3))
+ (forward-page)
+ (should (= (line-number-at-pos) 8))
+ (backward-page)
+ (should (= (line-number-at-pos) 3))))
+
(provide 'yaml-mode-test)
;;; yaml-mode-test.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/yaml-mode 5b58248ab2 2/2: Merge pull request #111 from yoshiki/add-test-110,
ELPA Syncer <=