File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -1136,3 +1136,36 @@ TEST_CASE("C and C++ stdout/stderr capture")
11361136 REQUIRE (captured_err.find (" C stderr" ) != std::string::npos);
11371137 REQUIRE (captured_err.find (" C++ stderr" ) != std::string::npos);
11381138}
1139+
1140+ #if defined(XEUS_CPP_EMSCRIPTEN_WASM_BUILD)
1141+ TEST_CASE (" headers found in sysroot/include/compat" )
1142+ {
1143+ std::vector<const char *> Args = {};
1144+ xcpp::interpreter interpreter ((int )Args.size (), Args.data ());
1145+ std::string code = " #include <xlocale.h>" ;
1146+ nl::json user_expressions = nl::json::object ();
1147+ xeus::execute_request_config config;
1148+ config.silent = false ;
1149+ config.store_history = false ;
1150+ config.allow_stdin = false ;
1151+ nl::json header = nl::json::object ();
1152+ xeus::xrequest_context::guid_list id = {};
1153+ xeus::xrequest_context context (header, id);
1154+
1155+ std::promise<nl::json> promise;
1156+ std::future<nl::json> future = promise.get_future ();
1157+ auto callback = [&promise](nl::json result) {
1158+ promise.set_value (result);
1159+ };
1160+
1161+ interpreter.execute_request (
1162+ std::move (context),
1163+ std::move (callback),
1164+ code,
1165+ std::move (config),
1166+ user_expressions
1167+ );
1168+ nl::json result = future.get ();
1169+ REQUIRE (result[" status" ] == " ok" );
1170+ }
1171+ #endif
You can’t perform that action at this time.
0 commit comments