vectorcraft/crates/engine/tests
dotCooCoo 3374d0778d Scripts: Check Script… reports what a .jsx script needs and does, without running it
VectorCraft does not run scripts written for the reference app, and
File › Scripts held only the disabled Other Script…. File › Scripts ›
Check Script… picks a .jsx, .jsxinc or .jsxbin file, reads it without
running any of it, and shows a report: what the script needs (the
script language's own objects, the document model, files, menu
commands, dialogs, or features only the reference app has), what it
would do outside the document, the menu-command strings it passes, the
document-model member chains and type names it uses, its directives,
the files it includes, and the problems that would stop it loading.
Copy Report copies the report as JSON. File › Open and drag-and-drop
show the report for those files too.

- vectorcraft-scriptcheck, a new Standalone crate with no
  dependencies, holds the checker: a lexer for ECMAScript 3 with E4X
  literals and the #name and //@name directive lines, and an analysis
  of the tokens that follows variables, function scopes and the files
  a script includes. It never recurses: open brackets, the levels of
  an XML literal and the function bodies being read are kept on stacks
  capped at 4,096. It reads at most 8 MiB of a file and 32 MiB with the
  included files, follows 64 included files 16 deep, looks up at most
  1,024 paths for them, keeps 1,000 entries in a list, tracks 1,000
  variables holding member chains and 1,000 holding File objects, and
  cuts echoed text to 120 characters. A compiled script is reported as
  compiled and isn't read.
- script.check (engine, a query) takes path, data or dataBase64. With a
  path and includes: true, it reads the files the #include lines name
  from inside the script's folder, through the automation read root,
  and when the script or one of those files assigns a member chain or a
  File object to a variable, the check treats the variable as holding
  it in every file. It doesn't follow absolute names, names, folders or
  links that lead out of the folder, names or folders longer than 4,096
  bytes, or JSINCLUDE, and it reads only regular files.
- ui.checkScript shows the report (dialog scriptCheck). File › Open
  lists Scripts (.jsx, .jsxinc, .jsxbin) and sends a script's path to
  script.check, which reads at most 8 MiB of it.

The language rules come from ECMA-262 3rd edition and ECMA-357 2nd
edition. The directive, platform and document-model root names come
from the public JavaScript Tools Guide and scripting guide pages that
catalog.rs cites by URL, and executeMenuCommand, doScript, loadAction,
unloadAction and selectTool come from the public forum posts cited
there; only names are used. Every script in the tests is written from
scratch with invented names.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-10-13 13:36:41 +07:00
..
affinity_artboards.rs M11: honor Move Artwork in artboard coordinate edits 2026-10-10 09:49:24 +02:00
affinity_corpus.rs Part of #666: Affinity rectangles keep per-corner radii and straight corners 2026-10-12 15:41:46 +07:00
affinity_text.rs Type: stylistic sets, alternates, titling, figure styles, superscript and subscript 2026-10-13 13:36:40 +07:00
artboard_click.rs fix: the Artboard tool creates an artboard from a clicked shape (#1227) 2026-10-12 15:17:12 +07:00
clear_commands.rs Fix #786: clear exact compound members and explicit targets 2026-10-09 11:33:23 -06:00
color_settings.rs Render: raster effects are made again when patterns, symbols, images, settings or fonts change 2026-10-13 00:34:41 +07:00
command_sweep.rs Part of #1377: Rectangular Grid and Polar Grid tool options (skew, frame, compound path, fill) 2026-10-12 19:22:36 +07:00
compound_attributes.rs fix: 複合パスの外観と塗り規則を修正する #1197 2026-10-12 00:12:52 +07:00
eyedropper_sources.rs fix: ロック中と隔離の外側の図形から色を取得する #1251 2026-10-12 07:25:43 +07:00
font_folder.rs Review fixes for #792: build expected test paths with the platform's separator 2026-10-10 09:07:53 +07:00
import_fuzz.rs Scripts: Check Script… reports what a .jsx script needs and does, without running it 2026-10-13 13:36:41 +07:00
inline_text.rs M7: inline symbols in text 2026-10-08 15:45:34 -07:00
known_bugs.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
lossy_overwrite.rs Part of #637: the editing data's structure read whole, colours, gradients, transparency, names, images and artboards included 2026-10-09 16:02:36 +07:00
model_based.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
open_relative_path.rs Open by a relative path finds relative links; convert reports import warnings 2026-10-13 13:36:40 +07:00
param_keys.rs Effects: effect.apply and effect.setParams refuse parameters the effect doesn't take (#1592) 2026-10-13 11:53:38 +07:00
pen_endpoint_picking.rs #1244: undo history bounded by bytes, without lookup tables or repeated selections in its steps 2026-10-12 11:02:17 +07:00
plugin_fuzz.rs Fix #121: sandboxed WebAssembly plug-ins: object filters and live effects 2026-10-06 00:19:41 +07:00
ruler_origin.rs feat: change and reset the ruler origin (#1212) 2026-10-12 15:17:24 +07:00
selection_commands.rs MCP: select.key checks its id, and agents can read the key object 2026-10-12 00:16:23 +07:00
stroke_visibility.rs Appearance panel: a stroke colour on an unpainted zero-width stroke restores 1 pt too (#1253) 2026-10-12 07:25:31 +07:00
text_import_fuzz.rs M4.54: Placing a text file asks for Text Import Options and sets it as area type 2026-10-05 10:07:23 +07:00