lukaslueg / macro_railroad

A library to generate syntax diagrams for Rust macros.
MIT License
529 stars 11 forks source link

Test browser support #16

Open lukaslueg opened 5 years ago

lukaslueg commented 5 years ago

The SVGs generated by macro_railroad should display correctly on most modern browsers. Although we do not use too much CSS-trickery, we want to ensure that the most used browsers always render the same output. This is especially important if macro_railroad should ever get on a path to be included in some form into rustdoc.

Come up with a scheme to automatically test that SVGs generated for specified test-cases result in the same rendering across browsers.

A rough sketch could be a test-suite that takes certain macros as input, produces variants of the diagrams, sends them to selenium to produce a screenshot and ensure that all screenshots look the same (for some definition).

Rust's RFC1985 has a list of browsers that rustdoc should always support. As of now this is

last 2 Chrome versions last 1 Firefox version Firefox ESR last 1 Safari version last 1 iOS version last 1 Edge version last 1 UCAndroid version