/*#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" */ #include "crank.h" #include #include kstd::string_view put(kstd::string_view args, crank_context& ctx) { args = skip_whitespace(args); auto key = extract_token(args); auto value = skip_linearspace(kstd::string_view(args.begin()+key.size(),args.end())); for(auto c : args) std::cout< "; while((std::getline(std::cin,get)).good()) { auto ret = ctx.eval(kstd::string_view(get.data(), get.size())); std::cout<<"&> "; for(auto c : ret) std::cout< "; } } /* TEST_CASE("crank") { crank_context ctx; static const char* setter_code = "set sample \"Hello world\""; kstd::string_view setter_c{(char*)setter_code, 24}; ctx.eval_no_copy(setter_c); static const char* getter_code = "$sample"; kstd::string_view getter_c{(char*)getter_code, 7}; ctx.eval_no_copy(getter_c); }*/