@Test
  public void testBeelineHiveVariable() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--hivevar");
    argList.add("DUMMY_TBL=dummy");
    final String SCRIPT_TEXT = "create table ${DUMMY_TBL} (d int);\nshow tables;\n drop table  ${DUMMY_TBL};";
    final String EXPECTED_PATTERN = "dummy";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }
Test Beeline -hivevar option. User can specify --hivevar name=value on Beeline command line.
In the script, user should be able to use it in the form of ${name}, which will be substituted with
the value.
@throws Throwable
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java