- move, remove() and zOrder throw "Only Image Trace can make a tracing",
with nothing changed, when they would leave an image at the bottom of
an ordinary group named Image Trace: a path moved out of the group or
to its top, Send to Back or Send Backward on the image, and Bring to
Front or Bring Forward on the object below it.
- releaseTracing() throws "Cannot release a tracing containing added
artwork", with nothing changed, when the tracing holds an object its
trace did not make. imageTrace.release keeps only the source image, so
the added object would be deleted.
- The TracingOptions members with no setting and TracingObject.areaCount
are left out of hasOwnProperty and reflect. Reading them still throws.
Docs: docs/mcp.md.
The test caught any panic from its closure, so a failed set_permissions
would also pass it while the file was still writable. It now asserts
the file is read-only before its panic and checks the caught payload is
that panic's message.
The second check of a checked write passed the open folder's path as
text and looked it up again. A path that was not valid UTF-8 was refused,
and a folder on that path replaced by a link into an allowed folder
between the two lookups could let a place outside pass.
check_write_real compares the open folder's real path with the write
roots and the script's grants as it is, without looking it up again.
- The folder is opened with O_PATH on Linux, Android and FreeBSD, so a
folder that can be written and searched but not listed takes the file.
The folder flush opens it for reading, and an error there still
reports the completed write.
- The replaced file's permissions are read after the new content is
written, as write_atomic_with reads them, so permissions taken away
meanwhile stay taken away. Its ACL is read only from the same file.
- A folder that changed while it was opened is no longer reported as a
read-only location.
- Errors name the kept temporary file where its folder is now, after
the folder moved.
- A file already at the name the old content is copied to is left as it
is: only a copy this save made and could not finish is removed.
a_script_gate_does_not_write_over_a_read_only_file created its
ReadOnlyFixture guard after two assertions, so a failure in either left
the test folder behind. The guard is now created right after the file
path is made, before the file is written.
folder() in tests/script_save_open.rs returned a PathBuf, and each test
removed its folder only on its last line, so a failed assertion or a
panicking script left the folder in the system's temporary folder. It now
returns a Workspace guard, as tests/script_print.rs does, which removes
the folder when it is dropped and clears read-only flags first when the
first removal fails (Windows does not delete a read-only file).
a_script_gate_does_not_write_over_a_read_only_file in file_access.rs made
its file writable again and removed its folder only after its last
assertion; a guard now does both when the test ends.
While automation roots or a script's file grants are in force, a save,
export or print to a file checked its path and then wrote it by name: the
temporary file was created beside the target by name and renamed over it
by name. A folder on the path replaced by a link between the check and
the rename sent the file outside the allowed folders.
vectorcraft_format::write_atomic_checked opens the target's folder once,
checks the path that open folder has with the caller's check, and makes
the temporary file, the rename, the copy over the file where the folder
refuses the rename, and the folder flush through that open folder
(openat, renameat, fsync). A folder replaced before it is opened fails
the check; one replaced after it is opened does not receive the file. A
link put at the final name after the check is replaced, not followed.
The replaced file's permissions, group and ACL are copied through the
open handles.
write_file, write_file_with and write_save_file_with use it while writes
are checked, and keep write_atomic_with otherwise. Outside Unix the check
runs on the path and the write is unchanged.
A new IllustratorSaveOptions left compatibility unset, so a script that
read it before setting it got undefined. It now starts at
Compatibility.ILLUSTRATOR19, the documented default, which saveAs already
accepts without changing what it writes.
graph_column_params_are_checked_and_designs_too_big_are_drawn_plain checked
only the plain column's height, so an ellipse of the same height passed. It
now also checks that the column's path is the rectangle of its bounds.
Setting width, height, left, top or position on an item in a document in
the back measured the item before its document was made active. Making a
document active measures its type again where it is not measured yet or
where a composite font of the same name changed, so the scale ratio or the
move distance applied to bounds that no longer held, and the item ended
at a different size or place than the one asked for.
The measurement now runs inside the edit, after the switch, through a new
edit_item_with that edit_item also uses.
A new test runs the same eight objects with seed 11, an end and
removeUnused in two fresh sessions and checks that each object gets the
same number and the same objects are removed. The progress doc line says
that in numbers and placeholder modes objects without a match are
skipped before ordering, so they take no number and are never deleted,
and that only a run that changes the document makes an undo step.
The deadline test and the kept-files test polled the search's progress
with a 2 ms sleep until the walker was blocked reading a file, which
test-lint rejects. The blocking visitors now send on a channel as their
read begins, and the tests wait on that channel instead.
Engine tests in crates/engine/src/tests that asserted something of every
item in a list passed when the list was empty. They now pin the count or
the exact value:
- keyguide, menucmds, recolor: the guide positions, the smart
punctuation counts and the theme picker's colors are compared whole.
- overprint, script_text, stylepanel, textedit, typearea: the text is
checked first, and character runs must exist; the Graphic Styles test
checks the red fill itself, not only some fill.
- package, pattern, perspgrid, pixelalign, recolor, swatchcmds,
symbollib, xform: the links, stored graph paints, corners, anchors,
map rows, group colors, gradient stops and symbol sizes are counted.
- rastersettings: the white-background image has the size of the clear
one.
- textcombos: both paragraphs take the composer and justification.
- textedit: a character style range past u32 leaves the text object
unchanged.
The `sized` helper in the graph tests now also requires the path to be the
four corners of its bounds, so a circle with the same 5 by 5 bounds no
longer passes as a default square marker. The plain column drawn in place
of a design past the budget is checked for its exact 140 point value
height instead of a height above 8 points.
Three graph tests checked only that a series group has children. A line
series also holds its line, and a column series holds its column, so the
check passed with no markers drawn. The tests now count the 5-point
squares at the data points, check the line and the column on their own,
and count the legend swatch only where the graph draws a legend.
Engine tests in crates/engine/src/tests that passed on a broken result
now check the result:
- cancel: Export PDF under a canceled token stops, and outside it the
whole file is written.
- ids_without_selection: each command refuses with nothing selected,
then changes the object given in one undo step.
- pathops: every bad input is refused and changes nothing.
- plugins: the folder's plug-in is listed as loaded, nothing is loaded
once the folder is cleared, and it loads again when set again.
- brushlib: the pasted brush and its pattern equal the copied ones.
- build: Image Trace keeps a preset's settings passed back, for one
preset with an enhanced version and one without, in place of a loop
over every preset.
- strokegeom: two width profiles and two arrowheads are checked by
value, in place of a round trip over every preset and arrowhead.
- script_xmp: the ACL test fails instead of returning when the default
ACL cannot be set.
- Tests that checked every item of a list now also check its length, so
an empty list fails (bboxrotate, build, clippaint, colormgmt,
constrain_new, dynamic_symbols, freeform, gradient).
Removed: a manual timing probe in areafit, covered by
auto_height_in_columns_lays_out_the_columns_twice_a_keystroke, and two
plug-in file generators in plugins that ran only with an environment
variable set, covered by live_effects_are_given_their_object_s_paints
and filters_set_effects_and_stroke_styles.
object.path.simplify now refuses a negative tolerance and a level
outside 0 to 100, which it clamped before.
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.