Tests that passed on an empty list, a missing write or a fixed sleep now
check the result itself:
- The folder search deadline test waits for the walker to block, then
ends the search's time with Search::expire instead of sleeping past a
0.2 s limit. The deadline is kept as nanoseconds after the start so a
test can move it.
- The stale current layer tests check that the compound path still holds
only the paths it was made from; the send-to-layer test sets the stale
id itself, since undo now restores the earlier layer.
- BMP gray export draws a red square and checks it comes out a middle
gray; a black and white page passed with gray turned off.
- Rewriting an EPS the import read whole checks the file changed and
reopens with its art.
- The local Affinity sample test is ignored with a reason instead of
returning at once without AFFINITY_SAMPLES.
- all() checks over anchors, seam fills, graph marks, legend rows, label
looks, retype fonts, text runs, dimension lines and preflight ids now
also pin the count or the text, so an empty result fails.
svg_type_shifted_two_billion_points_exports_to_pdf now checks that the
SVG import keeps the type's shift of more than 2,000,000,000 pt, and that
the exported PDF leaves the type out, read back with the PDF importer.
Before, it checked only that the export returned Ok, so an import that
dropped or clamped the shift made it pass without reaching the bound.
a_long_thin_shape_with_a_shadow_renders_and_exports now checks that the
Affinity import gives exactly one shape with a drop shadow, more than
3,000,000 pt wide, before it renders and exports it. Before, an import
that dropped the shadow made it pass without drawing one.
The other 66 test-lint hits in import_fuzz.rs are property tests whose
claim is that hostile input loads, renders and exports without a panic.
Their helpers (survive, survive_library and the others) fail the case
through TestCaseError, which the no-assertion rule does not count.
The recolor adjustment test read test.af from the repository root and
returned early when the file was absent, so it never ran in CI. It now
builds a magenta rectangle with an attached Recolor adjustment in the
test and checks that lightness 1 imports as a white fill, that
lightness 0.5 at hue 0 draws pure red, and that a hidden adjustment
leaves the fill unchanged.
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 1000% scale limit applies only when Fit to Page is off, since the
scale factors are not used with it on.
- A script run clears the print command allowance when it ends, so a
panic inside print cannot leave file.print open to later runs.
- saveAs without options takes the format from the path the script
names, so a link at that path cannot change it.
- A File the host gives back charges its path to the heap.
- DocumentPreset.typename throws for a preset from an earlier run.
- Documents.addDocumentNoUI throws that it is not available yet.
- The print tests remove their folders when an assertion fails.
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.
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.
- document.open refuses page, cropTo, pages and crop when a named importer reads the file (linkPages
still uses the built-in reader).
- exportFile with explicit null options throws a TypeError for GIF, PNG8 and TIFF too.
- close(SaveOptions.SAVECHANGES) saves a modern .ai or .ait file and an SVG file with Preserve
Editing whatever range was remembered; a range the save refuses still refuses.
- The script checker keeps a try statement's catch and finally, and an else after a nested
do-while, inside the loop body; a line break after a label does not start a new statement; a
this assignment in a function that hides a global clears the global's saved methods; and
holder.d['saveAs'] = ... no longer counts as a write to d.
- docs/mcp.md describes which files keep every artboard on close.
Object > Plug-ins > Arrange Tools > Group by Row... (addon.arrange.groupRows)
groups the selected top-level objects by the rows their visual bounds share:
an object joins a row when its bounds overlap the row from top to bottom,
and Group By Columns does the same from left to right. Extents that only
touch stay apart, and an object that overlaps two rows joins them into one.
Only objects in the same layer or group and on the same artboard share a
row; an object alone in its row stays as it is. Each new group takes its
frontmost member's place in the stacking order, and the groups and the
objects left alone stay selected. One undo step, none when no row holds two
objects; an unknown direction is refused. At most 20000 objects, sorted
once along the axis.
Group Overlapping Objects and Group by Row share the step that builds the
groups. The dialog has Group By (Rows or Columns) with Preview.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
main's Document member list held saveAs and close as members that are not
available yet; this branch's save_open members implement them, so the
merge drops them from that list and keeps main's other entries. The
script host test lists take main's members together with this branch's
open, userInteractionLevel, fullName, path, saved and option classes,
and the heap accounting keeps main's ModuleNamespace arm beside the
FsEntry string arm.
Object > Plug-ins > Arrange Tools > Mark Bounds of Each... runs the new
command addon.arrange.markBounds. For each selected object it draws a
group of four inward L-shaped corner marks (10 pt legs by default, each
at most half the side it runs along) or a rectangle, with no fill and a
red 1 pt stroke by default, on the object's geometric or visual bounds.
Visual bounds count strokes, brush art and effects as drawn.
- Clip groups are measured by their clipping path, other groups by
their members together. Guides and objects without bounds, such as
empty groups, are skipped; a selection with nothing to mark is an
error that makes no undo step.
- The marks go directly above their object, or above the outermost clip
group or clipping sublayer that holds it, so the mask does not clip
them. The run is one undo step and selects the marks.
- Out-of-range lengths and weights, unknown styles and bounds, and bad
colors are errors; defaults apply only to omitted values. At most
20000 objects are marked at once.
- The dialog has Preview; Length is off unless Draw is Corner Marks.
- vectorcraft-render gains drawn_bounds_with, drawn_bounds with a shared
symbol cache, so a large selection measures each symbol once.
Docs: docs/mcp.md, ROADMAP.
addon.select.editPointsOnly {segmentEnds?} turns the current selection into
one that holds only anchor points, so a move or transform that follows acts
on the points alone. Selected segments leave the selection, and the points
at their ends leave it too unless segmentEnds is true. Paths selected whole
keep every point. A group or compound path selected whole gives way to the
visible, unlocked paths inside it (no Shaper Group originals, and no guide
paths while guides are locked). Type, images, symbols and other objects
without anchor points leave the selection.
Only the selection changes, so there is no undo step. With nothing selected
or nothing left to keep it is an error and the selection stays as it was.
The command is on the plug-in allowed list.
Object > Plug-ins > Selection Tools > Edit Points Only... opens a dialog
with Keep Ends of Selected Segments; it previews the narrowed selection on
the canvas, OK keeps it and Cancel puts the selection back.
Docs: docs/mcp.md, docs/target-app-parity.md.
Object › Plug-ins › Color Effects › Randomize Fill Colors… gives each
selected filled path and compound path, and each one inside the selected
groups and clipping groups, a fill color of its own, picked at random
from a seed, as one undo step (none when no fill changes).
- addon.color.randomFill {scheme?, swatch?, min?, max?, seed?, ids?}:
"color" picks red, green and blue at random in the document's color
mode, "tint" picks a linked tint of a global or spot swatch, and "gray"
picks a gray, the tints and grays between min and max percent.
- Unfilled paths, clipping paths (compound ones included), hidden and
locked objects and the objects in hidden or locked groups and layers,
type, images, symbol instances, blends and envelopes keep their fills.
A compound path's member given by id colors the compound path, and an
object reached twice is colored once.
- Bad params are refused: an unknown scheme, min or max with "color",
swatch without "tint", a percent outside 0 to 100, min above max, a
missing or process swatch, and a seed that is not a whole number.
- The dialog has Colors, Swatch (the document's global and spot
swatches), Minimum, Maximum and Seed, with Preview; OK is off while the
minimum is above the maximum or tints have no swatch.
Docs: docs/mcp.md, ROADMAP, docs/target-app-parity.md, docs/ui-parity.md.