Fix path to Lezer LaTeX examples (#14364)

GitOrigin-RevId: bcabe1b73f09078367976456e4d1fddc02688b80
This commit is contained in:
Alf Eaton 2023-08-17 11:02:13 +01:00 committed by Copybot
parent c90f4bee62
commit 28a7c13887
4 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ make test_unit MOCHA_GREP='lezer-latex'
## Trying the parser
While developing the parser, you can run it against a file by calling the `lezer-latex:run` task. There are
some example files in the test suite, at `web/test/frontend/shared/lezer-latex/examples/`.
some example files in the test suite, at `web/test/unit/src/LezerLatex/examples/`.
For example:

View file

@ -13,7 +13,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
const examplesDir = path.join(
__dirname,
'../../test/unit/src/lezer-latex/examples'
'../../test/unit/src/LezerLatex/examples'
)
const strictParser = parser.configure({ strict: true }) // throw exception for invalid documents

View file

@ -6,9 +6,9 @@ import { parser as BibTeXParser } from '../../frontend/js/features/source-editor
// Runs the lezer-latex or lezer-bibtex parser on a supplied file, and prints the resulting
// parse tree to stdout
//
// show parse tree: lezer-latex-run.js test/frontend/shared/lezer-latex/examples/amsmath.tex
// lezer-latex-run.js test/frontend/shared/lezer-latex/examples/overleaf.bib
// show error summary: lezer-latex-run.js coverage test/frontend/shared/lezer-latex/examples/amsmath.tex
// show parse tree: lezer-latex-run.js test/unit/src/LezerLatex/examples/amsmath.tex
// lezer-latex-run.js test/unit/src/LezerLatex/examples/overleaf.bib
// show error summary: lezer-latex-run.js coverage test/unit/src/LezerLatex/examples/amsmath.tex
let files = process.argv.slice(2)
if (!files.length) {

View file

@ -14,7 +14,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
const examplesDir = path.join(
__dirname,
'../../test/unit/src/lezer-latex/examples'
'../../test/unit/src/LezerLatex/examples'
)
const folder = examplesDir