You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/function-list.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,17 +97,17 @@ It could be that you're creating a new language parser for function list, or you
97
97
98
98
If you're improving an existing parser, and `unitTest` is present, then you should **modify the existing unitTest file** or **add a new unitTest file**. If your modification of parser is for covering few more cases, then you can add these case into the existing unitTest file. Otherwise if the modification is for covering the other cathgories and you have to add a lot of functions to test, you can just leave the current unitTest file as it is, and add your new unitTest file.
99
99
100
-
**Modify the existing unitTest file**
100
+
**- Modify the existing unitTest file**
101
101
102
102
1. Run unit tests (check above [Unit tests](#unit-tests) section) to make sure your `functionList.xml` won't cause any regression.
103
103
2. Modify the file `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\[langName]\unitTest` according your enhancement. Generally, you don't remove content but you add the content in this file.
104
104
3. Open `cmd` go to `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\`, run the command `..\..\bin\notepad++.exe -export=functionList -l[langName] .\[langName]\unitTest`
105
105
4. A file named `unitTest.result.json` will be generated. Remove `unitTest.expected.result` and Rename `unitTest.result.json` to `unitTest.expected.result`.
106
106
107
-
**Add a new unitTest file**
107
+
**- Add a new unitTest file**
108
108
109
109
1. Run unit tests (check above [Unit tests](#unit-tests) section) to make sure your `functionList.xml` won't cause any regression.
110
110
2. Add a directory into `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\[langName]\`, the name of directory is arbitary but should be relevant to the category of the test. Name your unit test file as `unitTest` and copy it into the directory you just created.
111
-
3. Open `cmd` go to `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\`, run the command `..\..\bin\notepad++.exe -export=functionList -l[langName] .\[langName]\unitTest`
112
-
4.2 files named `unitTest.result.json` will be generated in [langName] root and in the created directory. Removethe the one in [langName] root`[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\[langName]\unitTest.result.json`, and Rename `unitTest.result.json` in the created directory `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\[langName]\[yourTestDir2]\` to `unitTest.expected.result`.
111
+
3. Open `cmd` go to `[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\`, run the command `..\..\bin\notepad++.exe -export=functionList -l[langName] .\[langName]\[yourTestDir2]\unitTest`
112
+
4.A file named `unitTest.result.json` will be generated in the created directory`[YOUR_SOURCES_DIR]\notepad-plus-plus\PowerEditor\Test\FunctionList\[langName]\[yourTestDir2]\`. Rename `unitTest.result.json` in the created directory to `unitTest.expected.result`.
0 commit comments