Skip to content

Commit ea00e12

Browse files
committed
refactor: handlebars fixtures in test-files
1 parent 4949e89 commit ea00e12

File tree

7 files changed

+8
-848
lines changed

7 files changed

+8
-848
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ if (MRDOX_BUILD_TESTS)
253253
if (MRDOX_CLANG)
254254
target_compile_options(mrdox-test PRIVATE -Wno-covered-switch-default)
255255
endif ()
256-
target_compile_definitions(mrdox-test PRIVATE -DMRDOX_UNIT_TEST_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test/unit")
256+
target_compile_definitions(mrdox-test PRIVATE -DMRDOX_TEST_FILES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test-files")
257257
add_custom_command(
258258
# if we run tests, we need the addons in the right place.
259259
TARGET mrdox-test

src/test/unit/Support/Handlebars.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ void
6464
setup_fixtures()
6565
{
6666
master.template_path =
67-
MRDOX_UNIT_TEST_DIR "/fixtures/handlebars_features_test.adoc.hbs";
67+
MRDOX_TEST_FILES_DIR "/handlebars/features_test.adoc.hbs";
6868
master.partial_paths = {
69-
MRDOX_UNIT_TEST_DIR "/fixtures/record-detail.adoc.hbs",
70-
MRDOX_UNIT_TEST_DIR "/fixtures/escaped.adoc.hbs"};
69+
MRDOX_TEST_FILES_DIR "/handlebars/record-detail.adoc.hbs",
70+
MRDOX_TEST_FILES_DIR "/handlebars/escaped.adoc.hbs"};
7171
master.output_path =
72-
MRDOX_UNIT_TEST_DIR "/fixtures/handlebars_features_test.adoc";
72+
MRDOX_TEST_FILES_DIR "/handlebars/features_test.adoc";
7373
master.error_output_path =
74-
MRDOX_UNIT_TEST_DIR "/fixtures/handlebars_features_test_error.adoc";
74+
MRDOX_TEST_FILES_DIR "/handlebars/features_test_error.adoc";
7575
master.logger_output_path =
76-
MRDOX_UNIT_TEST_DIR "/fixtures/logger_output.txt";
76+
MRDOX_TEST_FILES_DIR "/handlebars/logger_output.txt";
7777
master.logger_error_output_path =
78-
MRDOX_UNIT_TEST_DIR "/fixtures/logger_output_error.txt";
78+
MRDOX_TEST_FILES_DIR "/handlebars/logger_output_error.txt";
7979

8080
Expected<std::string> template_text_r =
8181
files::getFileText(master.template_path);

0 commit comments

Comments
 (0)