<commit_before>// RUN: cat %s | %cling -I%p 2>&1

// XFAIL:*
// XFAIL because there is no such function gCling->createUniqueName() (taking)
// 0 args. If run in gdb it reports the error. If run with the testsuite it say
// success. Probably system i/o is not properly piped.

// Tests the ability of cling to host itself. We can have cling instances in
// cling's runtime. This is important for people, who use cling embedded in
// their frameworks.

#include "cling/Interpreter/Interpreter.h"

gCling->process("const char * const argV = \"cling\";");
gCling->process("cling::Interpreter *DefaultInterp;");

gCling->process("DefaultInterp = new cling::Interpreter(1, &argV);");
gCling->process("DefaultInterp->process(\"#include \\\"cling/Interpreter/Interpreter.h\\\"\");");
gCling->process("DefaultInterp->process(\"gCling->createUniqueName()\");");<commit_msg>Totally wrong assumptions. Pipe everything in FileCheck and we are done.<commit_after>// RUN: cat %s | %cling -I%p 2>&1 | FileCheck %s

// Tests the ability of cling to host itself. We can have cling instances in
// cling's runtime. This is important for people, who use cling embedded in
// their frameworks.

#include "cling/Interpreter/Interpreter.h"

gCling->process("const char * const argV = \"cling\";");
gCling->process("cling::Interpreter *DefaultInterp;");

gCling->process("DefaultInterp = new cling::Interpreter(1, &argV);");
gCling->process("DefaultInterp->process(\"#include \\\"cling/Interpreter/Interpreter.h\\\"\");");
gCling->process("DefaultInterp->process(\"std::string s; gCling->createUniqueName(s); s.c_str()\");");
// CHECK: (const char * const) "__cling_Un1Qu32"
.q
{'fraction_non_alphanumeric': 0.1675741076830006, 'fraction_numerical': 0.006049606775559589, 'mean_word_length': 4.84452296819788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1789190', 'n_tokens_mistral': 550, 'n_tokens_neox': 527, 'n_words': 157}