104 wxString srcDir = base.
path + wxFileName::GetPathSeparator() + wxS(
"src" );
105 BOOST_REQUIRE( wxFileName::Mkdir( srcDir, wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) );
107 wxString srcFile = srcDir + wxFileName::GetPathSeparator() + wxS(
"payload.txt" );
111 f.Write( wxS(
"hello" ) );
115 wxString nestedDir = base.
path + wxFileName::GetPathSeparator() + wxS(
"level1" )
116 + wxFileName::GetPathSeparator() + wxS(
"level2" );
117 wxString outPath = nestedDir + wxFileName::GetPathSeparator() + wxS(
"archive.zip" );
124 std::vector<wxString> noOverwriteList;
125 std::vector<JOB_OUTPUT> outputs;
126 std::optional<wxString> resolved;
128 bool ok = archive.
HandleOutputs( srcDir,
nullptr, noOverwriteList, outputs, resolved );
130 BOOST_CHECK_MESSAGE( ok,
"Archive job should succeed with a nested destination path." );
131 BOOST_CHECK_MESSAGE( wxFileName::DirExists( nestedDir ),
132 "Nested parent directory should have been created." );
134 BOOST_CHECK( wxFileName::FileExists( resolved.value() ) );
146 wxString srcDir = base.
path + wxFileName::GetPathSeparator() + wxS(
"src" );
147 BOOST_REQUIRE( wxFileName::Mkdir( srcDir, wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) );
149 wxString srcFile = srcDir + wxFileName::GetPathSeparator() + wxS(
"payload.txt" );
153 f.Write( wxS(
"hello" ) );
156 wxString outPath = base.
path + wxFileName::GetPathSeparator() + wxS(
"archive.zip" );
161 std::vector<wxString> noOverwriteList;
162 std::vector<JOB_OUTPUT> outputs;
163 std::optional<wxString> resolved;
165 bool ok = archive.
HandleOutputs( srcDir,
nullptr, noOverwriteList, outputs, resolved );
169 BOOST_CHECK( wxFileName::FileExists( resolved.value() ) );
bool HandleOutputs(const wxString &aBaseTempPath, PROJECT *aProject, const std::vector< wxString > &aPathsWithOverwriteDisallowed, const std::vector< JOB_OUTPUT > &aOutputsToHandle, std::optional< wxString > &aResolvedOutputPath) override
BOOST_CHECK_EQUAL(result, "25.4")