Skip to content

Commit 7bce7f6

Browse files
committed
Add "Regression test for Face" to CONTRIBUTING.md
GitHub-Issue: #509
1 parent 9d4f792 commit 7bce7f6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

CONTRIBUTING.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ All contributions to PHP Mode are welcome. But please try to do the following w
1818

1919
If you are fixing a bug related to a GitHub issue, then first of all, thank you for the help improving PHP Mode. Second, there is a `tests/` directory which contains PHP scripts for issues (although not all of them). Please consider adding a test script to that directory that documents the expected behavior and provides code that allows others to see if said behavior works properly. Then create a unit test within `php-mode-test.el` using [ERT]. Please try to follow the format of the existing tests.
2020

21+
### Regression test for Face (en)
22+
23+
In this project, the regression test of [Font Lock] is realized by creating a `foo.php.face` file to be paired with the` foo.php` file. Add the `: faces t` option to the` with-php-mode-test` argument to activate this test.
24+
25+
Please refer to [How to generate face file] for how to generate `.face` file required for this test.
26+
2127
----------
2228

2329
## Simplified Chinese
@@ -44,7 +50,7 @@ Please contribute.
4450

4551
### Guideline (ja)
4652

47-
PHPモードはどなたからの貢献も歓迎です。改善やバグ修正を行う前に以下の手順を行ってください。
53+
**Emacs PHP Mode**はどなたからの貢献も歓迎です。改善やバグ修正を行う前に以下の手順を行ってください。
4854

4955
1. あなたの名前が`README.md`の“Contributors”のリストになければ追加してください。あなたの名前とGitHubアカウントや個人サイトをリンクして構いません。
5056
2. もし既にissueとして提起された問題に対処するならば、コミットメッセージに`GitHub-Issue: #16`のような行を含めてください。
@@ -56,6 +62,14 @@ PHPモードはどなたからの貢献も歓迎です。改善やバグ修正
5662

5763
**GitHubのissueに関連するバグを修正する場合**: PHPモードの改善に協力いただきありがとうございます! `tests/`ディレクトリには(すべてではありませんが)issueに関連のあるPHPスクリプトが配置されています。そこに予期される挙動と他のひとが動作を適切に確認できるテストコードを追加することを検討してください。そして`php-mode-test.el`に既存のテストと同じように[ERT]を使ったテストコードを追加してください。
5864

65+
### Regression test for Face (ja)
66+
67+
このプロジェクトでは `foo.php` ファイルに対応した `foo.php.face` ファイルを作成することで[Font Lock]の回帰テストを実現しています。このテストを有効化するには`with-php-mode-test`の引数に`:faces t`オプションを追加してください。
68+
69+
このテストに必要な`.face`ファイルの生成方法は[How to generate face file]を参考にしてください。
70+
5971
[run all of the tests]: http://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-Interactively.html#Running-Tests-Interactively
6072
[`git bisect run`]: http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
6173
[ERT]: http://www.gnu.org/software/emacs/manual/html_node/ert/index.html
74+
[Font Lock]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Font-Lock-Mode.html
75+
[How to generate face file]: https://github.com/emacs-php/php-mode/issues/509#issuecomment-491528968

0 commit comments

Comments
 (0)