@Test
  public void testTabInScriptFile() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    final String SCRIPT_TEXT = "CREATE\tTABLE IF NOT EXISTS testTabInScriptFile\n(id\tint);\nSHOW TABLES;"
        + "\ndrop table testTabInScriptFile";
    final String EXPECTED_PATTERN = "testTabInScriptFile";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT, EXPECTED_PATTERN, false);
  }
Attempt to execute a simple script file with the -f option to BeeLine
The first command should fail and the second command should not execute
Print PASSED or FAILED
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java