Open Save in the project folder and offer the last name with a number counted on
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1281,6 +1281,21 @@ int main() {
|
||||
{
|
||||
const auto dir = std::filesystem::temp_directory_path() / "effector_test_project";
|
||||
std::filesystem::create_directories(dir);
|
||||
{
|
||||
const auto base = (dir / "city.png").string();
|
||||
std::filesystem::remove(dir / "city-1.png");
|
||||
std::filesystem::remove(dir / "city-2.png");
|
||||
check(nextExportPath(base) == (dir / "city-1.png").string(),
|
||||
"the next export after a plain name counts from 1");
|
||||
check(nextExportPath((dir / "city-1.png").string()) == (dir / "city-2.png").string(),
|
||||
"the next export counts on from the last number");
|
||||
std::ofstream((dir / "city-1.png").string()) << "x";
|
||||
check(nextExportPath(base) == (dir / "city-2.png").string(),
|
||||
"the next export skips a name already on disk");
|
||||
std::filesystem::remove(dir / "city-1.png");
|
||||
check(nextExportPath((dir / "a-b.mp4").string()) == (dir / "a-b-1.mp4").string(),
|
||||
"a dash before letters is not a count");
|
||||
}
|
||||
const auto source = dir / "source.png";
|
||||
gradient(64, 48, 7).save(source.string());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user