truss
Summary #
2 suites · 9 scenarios
Contents #
- truss convert (filesystem footprint) — 2 scenarios
- truss image conversion — 7 scenarios
- inspect reports PNG format and dimensions as JSON
- convert PNG to JPEG yields a same-size opaque JPEG
- resize with fit=fill produces the requested dimensions
- convert to WebP yields a WebP of the same dimensions
- a high-quality JPEG stays visually close to the source
- a lossless PNG re-encode is pixel-identical to the source
- a missing input file exits with the I/O error code
truss convert (filesystem footprint) #
Source: test/e2e/tools/truss/changes.atago.yaml
Scenario: convert PNG->JPEG creates only the output file #
only when truss --version succeeds · skipped on Windows
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o out.jpg
Then #
- exit code is
0 - the step changed exactly created
out.jpg, modified nothing, deleted nothing - image
out.jpgisjpeg, width 2, height 2
Generated artifacts #
out.jpg
Scenario: convert to a glob-matched output honors path.Match #
only when truss --version succeeds · skipped on Windows
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o thumb.webp --format webp
Then #
- exit code is
0 - the step changed exactly created
*.webp, modified nothing, deleted nothing
truss image conversion #
Source: test/e2e/tools/truss/convert.atago.yaml
Scenario: inspect reports PNG format and dimensions as JSON #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss inspect in.png
Then #
- exit code is
0 - stdout at
$.formatequalspng - stdout at
$.widthequals16 - stdout at
$.heightequals16
Scenario: convert PNG to JPEG yields a same-size opaque JPEG #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o out.jpg
Then #
- exit code is
0 - image
out.jpgisjpeg, width 16, height 16, has no alpha
Generated artifacts #
out.jpg
Scenario: resize with fit=fill produces the requested dimensions #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o thumb.png --width 8 --height 8 --fit fill
Then #
- exit code is
0 - image
thumb.pngispng, width 8, height 8
Generated artifacts #
thumb.png
Scenario: convert to WebP yields a WebP of the same dimensions #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o out.webp --format webp
Then #
- exit code is
0 - image
out.webpiswebp, width 16, height 16
Generated artifacts #
out.webp
Scenario: a high-quality JPEG stays visually close to the source #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o out.jpg --quality 100
Then #
- exit code is
0 - image
out.jpgsimilar totestdata/sample.png
Expected output #
expected image testdata/sample.png:

Generated artifacts #
out.jpg
Scenario: a lossless PNG re-encode is pixel-identical to the source #
only when truss --version succeeds
Given #
- Fixture file
in.pngis created.
When #
truss convert in.png -o copy.png
Then #
- exit code is
0 - image
copy.pngsimilar totestdata/sample.png
Expected output #
expected image testdata/sample.png:

Generated artifacts #
copy.png
Scenario: a missing input file exits with the I/O error code #
only when truss --version succeeds
When #
truss convert does-not-exist.png -o out.jpg
Then #
- exit code is
2 - stderr contains
does-not-exist.png