@Test
  public void testPositiveScriptFile() throws Throwable {
    final String SCRIPT_TEXT = "show databases;\n";
    final String EXPECTED_PATTERN = " default ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }
Attempt to execute a simple script file with the -f option to BeeLine
Test for presence of an expected pattern
in the output (stdout or stderr), fail if not found
Print PASSED or FAILED
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java