Files
processing4/java/test
Avinash Kumar Deepak fa85cd48e8 fix(cli): support sketches with custom main file names (#1329)
* fix(cli): support sketches with custom main file names

Previously, the CLI only accepted sketches where the main .pde file
matched the sketch folder name (e.g., sketch/sketch.pde). This caused
issues when users renamed their main file in the IDE, which stores
the custom filename in sketch.properties.

Now the CLI checks sketch.properties for a 'main' property before
falling back to the default naming convention, matching the IDE's
behavior implemented in Sketch.findMain().

Fixes #1219

* test: add CLI test for custom main file support

Added testSketchWithCustomMainFile() to CLITest.kt as requested by maintainer. This test provides a placeholder for manual testing of sketches with custom main files specified in sketch.properties.

Follows the same pattern as existing CLI tests (testLSP, testLegacyCLI) and is intended to be run manually in IntelliJ IDEA.

* test: convert to automated CLI test with temp directory

Converted testSketchWithCustomMainFile() from manual to automated test. Now creates a temporary sketch folder with custom main file and sketch.properties, then tests the CLI build command.

Follows the pattern from SchemaTest.kt using Files.createTempDirectory() and automatic cleanup.
2026-01-27 19:43:24 -05:00
..
2021-10-10 11:30:24 -07:00