KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_jobs_output_archive.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <jobs/jobs_output_archive.h>
#include <wx/file.h>
#include <wx/filename.h>

Go to the source code of this file.

Classes

struct  ScopedTempDir
 Scoped temporary directory used by the tests below. More...
 

Functions

 BOOST_AUTO_TEST_CASE (NestedDestinationPathCreatesParents)
 Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24162.
 
 BOOST_AUTO_TEST_CASE (ExistingDestinationStillWorks)
 Sanity check: an existing destination directory must still work after the mkdir change.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( ExistingDestinationStillWorks )

Sanity check: an existing destination directory must still work after the mkdir change.

Definition at line 109 of file test_jobs_output_archive.cpp.

References BOOST_REQUIRE(), JOBS_OUTPUT_ARCHIVE::HandleOutputs(), ScopedTempDir::path, and JOBS_OUTPUT_HANDLER::SetOutputPath().

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( NestedDestinationPathCreatesParents )

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24162.

The archive output handler must create missing parent directories on demand, matching the folder output handler. Previously, writing an archive to a path such as "subdir1/subdir2/archive.zip" failed because the intermediate directories did not exist when the file stream was opened.

Definition at line 66 of file test_jobs_output_archive.cpp.

References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), JOBS_OUTPUT_ARCHIVE::HandleOutputs(), ScopedTempDir::path, and JOBS_OUTPUT_HANDLER::SetOutputPath().