@@ -99,6 +99,43 @@ TEST_SUITE("execute_request")
9999 REQUIRE (result[" status" ] == " ok" );
100100 }
101101
102+ #if defined(XEUS_CPP_EMSCRIPTEN_WASM_BUILD)
103+ TEST_CASE (" headers found in sysroot/include/compat" )
104+ {
105+ std::vector<const char *> Args = {
106+ " -v" ,
107+ " -Xclang" , " -iwithsysroot/include/compat"
108+ };
109+
110+ xcpp::interpreter interpreter ((int )Args.size (), Args.data ());
111+ std::string code = " #include <xlocale.h>" ;
112+ nl::json user_expressions = nl::json::object ();
113+ xeus::execute_request_config config;
114+ config.silent = false ;
115+ config.store_history = false ;
116+ config.allow_stdin = false ;
117+ nl::json header = nl::json::object ();
118+ xeus::xrequest_context::guid_list id = {};
119+ xeus::xrequest_context context (header, id);
120+
121+ std::promise<nl::json> promise;
122+ std::future<nl::json> future = promise.get_future ();
123+ auto callback = [&promise](nl::json result) {
124+ promise.set_value (result);
125+ };
126+
127+ interpreter.execute_request (
128+ std::move (context),
129+ std::move (callback),
130+ code,
131+ std::move (config),
132+ user_expressions
133+ );
134+ nl::json result = future.get ();
135+ REQUIRE (result[" status" ] == " ok" );
136+ }
137+ #endif
138+
102139 TEST_CASE (" fetch_documentation" )
103140 {
104141 std::vector<const char *> Args = {/* "-v", "resource-dir", "....."*/ };
0 commit comments