This PR adds the infrastructure for testing the code gen for different CLI flags, which is important for #4229 (and #4065). This is done using // FLAGS: --flag1 --flag2=value comments, which are passed directly to the CLI.
One hacky thing I had to do was to parse the --target option. This is necessary, because the target determines which files the reference test compares. E.g. bundler compares reference_test_bg.js while everything else compares reference_test.js (no _bg).
This PR adds the infrastructure for testing the code gen for different CLI flags, which is important for #4229 (and #4065). This is done using
// FLAGS: --flag1 --flag2=value
comments, which are passed directly to the CLI.One hacky thing I had to do was to parse the
--target
option. This is necessary, because the target determines which files the reference test compares. E.g.bundler
comparesreference_test_bg.js
while everything else comparesreference_test.js
(no_bg
).