with_profiles on main returns the TempDir root as a third value, so the
three new listing tests did not compile after the merge. They now keep
their outside files under that root, which removes them on drop.
file.newProfiles and Manage Profiles checked a profile's file with
is_file, which follows a link. A profile file that was a link to a
document was listed as customized with Edit on, while file.new refuses
to read a link and gives the new document the defaults. A link that
led nowhere, or a folder, was listed as not customized, so Reset was
off and could not remove it, and Edit on a link that led nowhere wrote
the shipped profile where the link pointed.
The profile's file is now looked at without following a link:
- file.newProfiles lists a link or a folder as customized, with
unusable: "not a plain file".
- Manage Profiles dims that profile's name, says why in its tooltip,
and turns Edit off. Reset stays on for a link and removes the link,
not the file it leads to. Reset is off for a folder, and
file.newProfiles.reset gives an error instead of deleting a folder.
- file.newProfiles.edit gives an error for a link or a folder, and
creates a missing profile file without following a link put there.
Docs: docs/mcp.md (New Document profiles) and the command help.
- pageItems, pathItems and textFrames build their list of a document again
after every edit. The rebuild walked the whole document without counting
anything against the run, so a loop that edits and reads a collection in a
large document did unbounded host work. A rebuilt list now counts 16 bytes
per object (as the selection's list does) against the run's host-call
allowance, and the path and type lists count the page items they scan.
- An edit's own ordinary error was returned ahead of a stop (an uncatchable
Abort) from putting back the selection or switching back to the active
document, so a script could catch it and go on. A stop now comes first.
- An answer to a waiting call that could not be read as a value (nested too
deep, too many entries) ended the run instead of being thrown at the call.
It is now thrown there, where the script can catch it, and a ScriptUI dialog
that waited for the answer stops showing, as when its host call fails.
- The selection cost test also compares the host calls, under the same
64 KiB limit for both documents.
- The grid-by-column test now checks each artboard's row and column, so
RLGridByCol must fill from the rightmost column. It compared only the
number of distinct rows and columns before, which a left-to-right fill
also passes.
- The keepEmpty test asserts that keepEmpty false deletes the compound
path, instead of accepting any state other than an empty compound.
- The addDocument profile test closes the profile document before the
script reads the profile, so the read goes through the app-folder
exemption and not through the rule for open documents' files.
- The report-origin test adds authored ReferenceError controls for
Window and activeDocument, and for BridgeTalk thrown as an error
object, so a hint list that grows to those names cannot change a
message the script wrote.
- New Document profile tests, and the temporary folders and files in
script_dom.rs and script_run.rs, use vectorcraft_testkit::TempDir, so
a failing assertion no longer leaves process-id folders behind. The
linked-profile test keeps its link target in the same temporary
folder.
app.getIsFileOpen treated any path with a backslash as a Windows path,
turning each backslash into a folder separator and ignoring letter case.
On macOS and Linux a backslash is a character of a file name, so
getIsFileOpen answered true for the path /work/a\b.ai while /work/a/b.ai
was open.
Paths now get the Windows rules only on Windows or when they start with a
drive letter.
DocumentPreset.typename and toString() answered for a preset kept from
an earlier run with #targetengine, while its settings throw a TypeError.
Both now check the preset the way the settings do.
Documents.addDocumentNoUI(startupPreset) was missing. It now makes the
document addDocument(startupPreset) makes.
The Step and Repeat dialog now acts only on the document it was opened
on. Its preview no longer runs on another document, and OK is refused
there, or after File > Revert, with the reason shown. Opening the dialog
again rolls back the earlier dialog's preview instead of leaving its
copies on the canvas.
object.stepAndRepeat makes every copy first and inserts them in one
pass, so a large grid walks the document a fixed number of times
instead of once per copy. The stacking order of the copies is
unchanged. A negative margin, and a gap of minus the width or height
or less, are refused instead of being clamped or folding the grid back
on itself.
When outlines replace circles that sit in different groups, the circles
that go left their groups behind with nothing in them. Each group or
compound path left empty now goes in the same undo step, and so does
each group above it left empty in turn; layers and sublayers stay.
A transform that stretches an ellipse keeps its stored width and height,
so a circle stretched into an oval still stores equal ones. The refusal
now names unequal width and height only when the stored values differ,
and gives the general message otherwise. docs/mcp.md notes that more
than 2,000 objects are refused by the circle limit before any object is
checked.
Smooth Bridge only joins circles. Anything else in the selection gave
"select two or more circles to bridge", the same message as for one
circle. An ellipse drawn by dragging without Shift is a few tenths of a
point off a circle and was refused with that message, which did not say
which object was at fault or why.
The refusal now names the first object that is not a circle and why:
an ellipse whose width and height differ (draw it with Shift held, or
give it equal width and height), a compound path (release it first),
an object that is hidden or locked, or another object. The message
shows on the status line while the dialog previews and after OK.
Smooth Bridge refused a selected group with "select two or more circles
to bridge", even when every object in the group was a circle, so
grouping circles first and selecting the group did nothing. The command
now takes the objects inside each selected group (at any depth; a
clipping group stays one object), so a group of circles is bridged in
place, inside the group. A group that holds anything other than a circle
is still refused, as before.
The dialog's Reach field counts a selected group's objects too, so it is
available when a selected group holds three or more circles; a circle
selected together with its group counts once.
The enumerations whose default member an option keeps (OutputFlattening,
CompressionQuality, the PDF color, compression, mark and security enums,
and the SVG encoding, DTD, CSS and font enums) are now defined, so a
script that sets an option to its default no longer throws a
ReferenceError; another member still throws as not available yet.
saveAs, exportFile, app.open and close with SAVECHANGES refuse a path
whose real file name is not valid UTF-8 instead of writing to or opening
a file named with a lossy copy of it.
Make set the wrap option on every selected object, the area type
included, and the wrap resolver never wraps an object that has the
option, so selecting the object and the type together and choosing Make
left the type as it was.
- Make leaves a selected type object with another selected object above
it in its layer out of the wrap objects, and takes the option off it
if an earlier Make set it there. Text Wrap Options leaves it out too.
- Make warns in the status bar when no area type lies below any of its
wrap objects (the object is below the type, or the type is point
type).
- Make and Options record no undo step when nothing changes.
Docs: docs/mcp.md, the text_wrap tool description and the command
params text.
blend_render_consistency, direct_handle_mirror, ellipse_drag_anchors,
eraser_open_fill, group3_reference, path_fill_hits, pen_space_handle,
preflight and scissors_snap were each a test binary of their own. They
now are modules of crates/engine/tests/it, with their tests unchanged,
so the engine's tests link nine fewer binaries.
The files that stay separate change process-wide state (installed
plug-ins, Safe Mode, the font database, color settings, the working
directory), are run by name from CI or xtask (the Affinity corpus
tests, script_corpus, import_fuzz), or compile for about a minute on
their own (command_sweep), which would make every edit to tests/it
rebuild it.
Docs that named the old paths name the new ones, and the preflight
command in docs/production-preflight.md runs `--test it preflight::`.
Two engine tests ran the same inputs as another test and checked them
again with a tighter bound or a second check.
- commands_that_do_not_wait_for_a_tool_edit_change_no_document ran every
junk case of every non-waiting command on the Single and Multi
fixtures, which every_command_with_junk_params also runs. The junk
sweep now compares tool_edit_state before and after each of those
calls as well as its own panic, interaction and invariant checks. The
tool-edit test keeps only the cases that turn each option on and off
(option_cases), which the junk sweep does not send.
- turned_colored_inflate_facets_and_seams_cover_their_edges_once drew
the same turned Inflate in the same solid fill as one case of
colored_light_surfaces_match_supersampling_at_internal_facet_edges.
That case now carries its bound (at most one RGB channel more than 3
levels off, by no more than 4) and the separate test is removed.
Each merged test fails on a fault that only the removed check caught
before: document.info bumping the revision on a non-object params value
fails every_command_with_junk_params ("document.info "str" [Multi]"),
and solid_surface drawing every facet as a fill and a seam stroke fails
the supersampling test (2 channels off, at most 5).
docs/target-app-parity.md and waits_for_tool_edit's doc comment name
the tests that now hold these checks.