Test runner output differs from real output
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Information:
- Prism version: 1.29.0
Description
I am trying to add support for Adventure Game Studio script syntax and have the highlighter working, but I am unable to add tests because the test runner token stream appears to be different to the real token stream.
Example
Build the fork at https://github.com/adventuregamestudio/prism/tree/ags as normal (the only changes in the fork are the addition of two languages).
Using the language "agsdialog" with this content:
@S
@1
...will produce this output within the test page:
<span class="token line"><span class="token dialog-index variable">@S</span></span>
<span class="token line"><span class="token dialog-index variable">@1</span></span>
Using the following HTML based test through the test runner:
@S
@1
----------------------------------------------------
<span class="token line"><span class="token dialog-index variable">@S</span></span>
<span class="token line"><span class="token dialog-index variable">@1</span></span>
----------------------------------------------------
Dialog indices.
...will produce this output from the test:
<span class="token line"><span class="token dialog-index variable">@S</span></span>
<span class="token line"></span>
<span class="token line"></span>
<span class="token line"></span>
<span class="token line"></span>
<span class="token line"></span>
@1
To be very clear, I am only seeing problems within the test runner. Outside of the test runner the tokens and output are as expected, and this is visually confirmed on the test page:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the mismatch in the test runner using the agsdialog language and the @S/@1 input, then compare it with the output shown on the test page. Trace how the runner parses the HTML-based expected output; done means both tokens are preserved and the runner output matches the real highlighted output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100