[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f7c49c4 3/3: Copy census to print directory r
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f7c49c4 3/3: Copy census to print directory rather than to $PWD |
Date: |
Fri, 28 Jun 2019 11:41:36 -0400 (EDT) |
branch: master
commit f7c49c43f7fe925a05a417b68bb44c9b127e363e
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Copy census to print directory rather than to $PWD
---
census_view.cpp | 8 +++++---
wx_test_validate_output.cpp | 11 +++++++----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/census_view.cpp b/census_view.cpp
index 690551e..cd03c31 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1942,9 +1942,11 @@ void CensusView::DoCopyCensus() const
}
configurable_settings const& c = configurable_settings::instance();
- std::string const& e = c.spreadsheet_file_extension();
- std::string const f = fs::basename(base_filename()) + ".census.cns";
- std::string file_name = unique_filepath(f, e).string();
+ std::string const& print_dir = c.print_directory();
+ std::string const& tsv_ext = c.spreadsheet_file_extension();
+ std::string const f = fs::basename(base_filename()) + ".census.cns";
+ fs::path const g(modify_directory(f, print_dir));
+ std::string file_name = unique_filepath(g, tsv_ext).string();
std::ofstream ofs(file_name.c_str(), ios_out_app_binary());
for(auto const& header : distinct_headers)
diff --git a/wx_test_validate_output.cpp b/wx_test_validate_output.cpp
index d2d0fdb..040b9ea 100644
--- a/wx_test_validate_output.cpp
+++ b/wx_test_validate_output.cpp
@@ -207,13 +207,14 @@ void do_validate_monthly_trace
,char const* what
)
{
+ fs::path p(configurable_settings::instance().print_directory());
std::string const cell_trace_file
- (corp_name + "." + insured_name + monthly_trace_suffix(1)
+ (p.string() + "/" + corp_name + "." + insured_name +
monthly_trace_suffix(1)
);
output_file_existence_checker output_cell_trace(cell_trace_file);
std::string const census_trace_file
- (corp_name + monthly_trace_suffix(2)
+ (p.string() + "/" + corp_name + monthly_trace_suffix(2)
);
output_file_existence_checker output_census_trace(census_trace_file);
@@ -335,8 +336,9 @@ void validate_run_cell_and_copy_output
,std::string const& insured_name
)
{
+ fs::path p(configurable_settings::instance().print_directory());
std::string const cell_trace_file
- (corp_name + "." + insured_name + monthly_trace_suffix(1)
+ (p.string() + "/" + corp_name + "." + insured_name +
monthly_trace_suffix(1)
);
output_file_existence_checker output_cell_trace(cell_trace_file);
@@ -461,8 +463,9 @@ LMI_WX_TEST_CASE(validate_output_illustration)
{
// Build the path existence of which we're going to check and ensure that
// it doesn't exist before the start of the test.
+ fs::path p(configurable_settings::instance().print_directory());
output_file_existence_checker
- unnamed_trace("unnamed.monthly_trace" + tsv_ext());
+ unnamed_trace(p.string() + "/" + "unnamed.monthly_trace" + tsv_ext());
struct enter_comment_in_illustration_dialog
:public wxExpectModalBase<MvcController>