Special Characters in xUnit Report

Aperta
#175 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@tmbrbr ci sta già lavorando.

Dal 9/8/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug upstream

When running the JavaScript test suite in the browser context jstestbrowser, it is possible to specify a flag to produce xUnit XML output, i.e.

./mach jstestbrowser --log-xunit=jsbrowsertest_output.xml --headless

However, some of the tests contain ASCII control characters in their names (generated automatically from the test content), for example, small-codepoints.js

var gTestfile = 'small-codepoints.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 554079;
var summary = 'JSON.parse should reject U+0000 through U+001F';

print(BUGNUMBER + ": " + summary);

/**************
 * BEGIN TEST *
 **************/

for (var i = 0; i <= 0x1F; i++)
  testJSON('["a' + String.fromCharCode(i) + 'c"]', true);

The code responsible for creating the xml is xunit.py which creates an XML tree, containing the control characters. Minidom is then used to parse the output, but throws a parser error when it finds the control chars.

I pushed a workaround (410b04439631458795eb8e6df55249954785372a) which removed control chars before passing to minidom, which seems to work.

This issue is open as a reminder to raise a bug report with firefox as it will also be present there.

Lingua principale
JavaScript
Stelle
185
Fork
29
Merge medio
18h 41m
PR unite (30g)
1

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SAP/project-foxhound

Tutte le issue di SAP/project-foxhound

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.