Repository navigation
Add unit test and github actions configuration - #101
Conversation
|
Tests good, please merge it. |
| @@ -0,0 +1,117 @@ | |||
| ;;;; yaml-mode-test.el --- Tests for yaml-mode -*- lexical-binding: t; -*- | |||
|
|
|||
| ;; Copyright (C) 2010-2022 Yoshiki Kurihara | |||
There was a problem hiding this comment.
This is incorrect, you wrote the file, so you have the copyright and authorship.
|
|
||
| (require 'yaml-mode) | ||
| (require 'ert) | ||
| (require 'cl-lib) |
| ;; for version < 25 | ||
| (defconst yaml-test-font-lock-function | ||
| (if (fboundp 'font-lock-ensure) | ||
| #'font-lock-ensure #'font-lock-fontify-buffer)) |
There was a problem hiding this comment.
Either put the whole if expression on one line or every branch on a line.
| (if (fboundp 'font-lock-ensure) | ||
| #'font-lock-ensure #'font-lock-fontify-buffer)) | ||
|
|
||
| (defmacro yaml-test-string-mode (mode string &rest body) |
There was a problem hiding this comment.
This is a premature abstraction. Since only yaml-mode is tested, both macros can be combined into one:
- Change the
(funcall ,mode)line to(yaml-mode) - Rename this macro to
yaml-test-string - Delete the other macro
| "true" "True" "TRUE" "false" "False" "FALSE" | ||
| "on" "On" "ON" "off" "Off" "OFF") t) | ||
| " *$") | ||
| "\\b") |
There was a problem hiding this comment.
I've tested some more meanwhile and it does match True#123 which it shouldn't. So \\_> is better.
|
Generally speaking, I'm in for automating these checks. What do you think of using an existing solution for testing the font-lock bits, like using assess-face-at= from assess or faceup? |
|
|
||
| - uses: actions/checkout@v3 | ||
| - name: Install dependencies | ||
| run: sudo apt install pandoc aspell |
There was a problem hiding this comment.
It is wrong copy and paste, I'll fix later
| ;; Copyright (C) 2010-2022 Yoshiki Kurihara | ||
| ;; Copyright (C) 2022 - Shohei YOSHIDA | ||
|
|
||
| ;; Author: Yoshiki Kurihara <clouder@gmail.com> |
There was a problem hiding this comment.
Copyright and author are mismatched
|
@wasamasa I've fixed your comments |
I have never use such tools and I have never seen projects that use those frameworks, sorry. |
|
Thank you for reviewing |
Changing
This patch took #98 changes for adding unit test
CC: @LIUYINz