diff --git a/lib/dd3_legacy_core/include/dd3_legacy_core.h b/lib/dd3_legacy_core/include/dd3_legacy_core.h new file mode 100644 index 0000000..763d951 --- /dev/null +++ b/lib/dd3_legacy_core/include/dd3_legacy_core.h @@ -0,0 +1,4 @@ +#pragma once + +// Include this header in legacy Unity tests to force-link dd3_legacy_core. +void dd3_legacy_core_force_link(); diff --git a/lib/dd3_legacy_core/include/html_util.h b/lib/dd3_legacy_core/include/html_util.h new file mode 100644 index 0000000..02c96b4 --- /dev/null +++ b/lib/dd3_legacy_core/include/html_util.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +String html_escape(const String &input); +String url_encode_component(const String &input); +bool sanitize_device_id(const String &input, String &out_device_id); diff --git a/lib/dd3_legacy_core/src/dd3_legacy_core.cpp b/lib/dd3_legacy_core/src/dd3_legacy_core.cpp new file mode 100644 index 0000000..6de53d6 --- /dev/null +++ b/lib/dd3_legacy_core/src/dd3_legacy_core.cpp @@ -0,0 +1,3 @@ +#include "dd3_legacy_core.h" + +void dd3_legacy_core_force_link() {} diff --git a/src/html_util.cpp b/lib/dd3_legacy_core/src/html_util.cpp similarity index 100% rename from src/html_util.cpp rename to lib/dd3_legacy_core/src/html_util.cpp diff --git a/test/test_html_escape/test_html_escape.cpp b/test/test_html_escape/test_html_escape.cpp index bec1753..6731b9c 100644 --- a/test/test_html_escape/test_html_escape.cpp +++ b/test/test_html_escape/test_html_escape.cpp @@ -1,5 +1,6 @@ #include #include +#include "dd3_legacy_core.h" #include "html_util.h" static void test_html_escape_basic() { @@ -121,6 +122,7 @@ static void test_sanitize_device_id_rejects_invalid() { } void setup() { + dd3_legacy_core_force_link(); UNITY_BEGIN(); RUN_TEST(test_html_escape_basic); RUN_TEST(test_html_escape_adversarial);