@Test
  public void testLastLineCmdInScriptFile() throws Throwable {
    final String SCRIPT_TEXT = "show databases;\nshow tables;";
    final String EXPECTED_PATTERN = " testbeelinetable1 ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }
Fix to HIVE-10541: Beeline requires a newline at the end of each query in a file.
Otherwise, the last line of cmd in the script will be ignored.
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java