`tmp_dir` in `crates/engine/tests/script_startup.rs` now returns
`vectorcraft_testkit::TempDir`, which deletes the folder when the test
ends, also after a failed assertion. Before, every run left its folders
under the system temporary directory.
In the app, script.startup.run starts only the first queued run inside the request; the later
startup scripts and the chosen script start from the frame loop. Each of them now starts, and its
file is read, in the scope captured when the queue was built, so a confined request's automation
roots apply to every run it queued.
- A chosen script that script.run would refuse (a missing file, one larger
than 8 MiB, bad parameters) ends script.startup.run with script.run's
error before any startup script runs.
- When a queued run ends, the next one starts at the following pump, so
the ended run's report stays for the status bar. The queue counts as a
running script, so other runs and edits stay refused in that gap, and
Stop asked for in it stops the run that starts next.
- Queued runs that could not start show in the status bar in the same
frame, and the reply's failed list is not shown there again.
With Preferences > General > Run Startup Scripts on (off by default), the
.jsx files of the Startup Scripts folder next to the preferences run when
VectorCraft starts and before each script chosen from File > Scripts,
installed or Other Script..., one at a time and sorted by name without
regard to case. Each runs with the limits of any script and its own undo
step; one that cannot be read, is too large or fails is named in the
Script Console and the status bar, and the next one runs, then the chosen
script. Nothing runs in Safe Mode; after a launch that stopped, they run
once Disable and Continue or Start Normally is chosen, and the launch
marker names the running startup script so a stop there offers to disable
it. script.startup.run runs the folder; script.* is refused inside
scripts, so a startup script cannot start another round.