Skip to content

Commit

Permalink
Test cmd history support
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyilism authored and jenkins committed Jan 25, 2023
1 parent 90a7639 commit 1d5536f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/Driver/CommandHistory.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------

// clang-format off
// RUN: %rm /tmp/__testing_cling_history
// RUN: cat %s | env --unset=CLING_NOHISTORY CLING_HISTSIZE=8 CLING_HISTFILE="/tmp/__testing_cling_history" %cling - 2>&1
// RUN: diff /tmp/__testing_cling_history "%S/Inputs/cling_history"
// REQUIRES: not_system-windows

#include <iostream>

int i = 8;

template<class T>
struct type_a {
const T t;
double d;

/*
comment
* */

static const int i = 37;
};

// another comment

using std::cout;

std::cout << "test\n";

8 changes: 8 additions & 0 deletions test/Driver/Inputs/cling_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
comment
* */
static const int i = 37;
};
// another comment
using std::cout;
std::cout << "test\n";

0 comments on commit 1d5536f

Please sign in to comment.