Skip to content

Commit 5949281

Browse files
committed
rename fixtures folder
Signed-off-by: Qingpeng Li <qingpeng9802@gmail.com>
1 parent cc4a96b commit 5949281

File tree

10 files changed

+9
-9
lines changed

10 files changed

+9
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ node_modules
55
*.vsix
66
*.log
77
.parcel-cache
8-
syntaxes/test/generated/*
8+
syntaxes/fixtures/generated/*

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The recommended workflow is:
132132

133133
#### Maintain grammar health
134134
1. After you modified the grammar, run `npm run bg` to rebuild the grammar.
135-
2. Then, run `npm run testg` to test the grammar with the fixtures in `syntaxes/test/baselines`.
135+
2. Then, run `npm run testg` to test the grammar with the fixtures in `syntaxes/fixtures/baselines`.
136136
> You may optionally run `npx tsc -p syntaxes/scripts/tsconfig.json` to generate `gen_record.mjs`.
137137
3. Check if it is the test result you expected. Run `npm run diff` to find the differences between the baselines and generated.
138138
4. If the changes are what you expect, run `npm run accept` to accept the new baselines.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@
298298
"esbuildw": "npm run esbuild-base -- --sourcemap --watch",
299299
"tscc": "tsc -p ./",
300300
"tsccd": "tsc -p ./ --declaration --declarationMap",
301-
"diff": "cross-env-shell $DIFF syntaxes/test/baselines syntaxes/test/generated",
302-
"accept": "copyfiles -u 3 \"syntaxes/test/generated/*\" syntaxes/test/baselines"
301+
"diff": "cross-env-shell $DIFF syntaxes/fixtures/baselines syntaxes/fixtures/generated",
302+
"accept": "copyfiles -u 3 \"syntaxes/fixtures/generated/*\" syntaxes/fixtures/baselines"
303303
},
304304
"devDependencies": {
305305
"@types/js-yaml": "^4.0.6",
File renamed without changes.
File renamed without changes.

syntaxes/scripts/gen_record.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function generateScopesWorker(mainGrammar, oriLineArr) {
128128
* pass vt.IGrammer to avoid loading grammar again.
129129
*/
130130
function generateScopes(text, grammar) {
131-
//const text = await fsPromises.readFile('syntaxes/test/cases/demo.lsp', { encoding: 'utf-8' });
131+
//const text = await fsPromises.readFile('syntaxes/fixtures/cases/demo.lsp', { encoding: 'utf-8' });
132132
const oriLineArr = text.split(/\r\n|\r|\n/);
133133
const initGrammar = (scopeName) => {
134134
//const grammar = await (await getRegistery()).loadGrammar(scopeName);

syntaxes/scripts/gen_record.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function generateScopesWorker(mainGrammar: Grammar, oriLineArr: string[]): strin
161161
* pass vt.IGrammer to avoid loading grammar again.
162162
*/
163163
function generateScopes(text: string, grammar: vt.IGrammar) {
164-
//const text = await fsPromises.readFile('syntaxes/test/cases/demo.lsp', { encoding: 'utf-8' });
164+
//const text = await fsPromises.readFile('syntaxes/fixtures/cases/demo.lsp', { encoding: 'utf-8' });
165165

166166
const oriLineArr = text.split(/\r\n|\r|\n/);
167167

syntaxes/scripts/test_util.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import * as path from 'path';
66
import { generateScopes, getRegistery, GrammarScopeName } from './gen_record.mjs';
77

88
const syntaxes_root = 'syntaxes/';
9-
const generatedFolder = `${syntaxes_root}test/generated`;
10-
const baselineFolder = `${syntaxes_root}test/baselines`;
11-
const casesFolder = `${syntaxes_root}test/cases`;
9+
const generatedFolder = `${syntaxes_root}fixtures/generated`;
10+
const baselineFolder = `${syntaxes_root}fixtures/baselines`;
11+
const casesFolder = `${syntaxes_root}fixtures/cases`;
1212

1313
/**
1414
* @param {string} file

0 commit comments

Comments
 (0)