Syntax { Pattern getRegexLeadingWhitespaceTrim() { return regexLeadingWhitespaceTrim; } Syntax(final String delimiterCommentOpen, final String delimiterCommentClose,
      final String delimiterExecuteOpen, final String delimiterExecuteClose,
      final String delimiterPrintOpen,
      final String delimiterPrintClose, final String delimiterInterpolationOpen,
      final String delimiterInterpolationClose, final String whitespaceTrim,
      final boolean enableNewLineTrimming); String getCommentOpenDelimiter(); String getCommentCloseDelimiter(); String getExecuteOpenDelimiter(); String getExecuteCloseDelimiter(); String getPrintOpenDelimiter(); String getPrintCloseDelimiter(); String getInterpolationOpenDelimiter(); String getInterpolationCloseDelimiter(); String getWhitespaceTrim();  }
@Test void testLeadingWhitespaceTrimRegex() { Pattern pattern = syntax.getRegexLeadingWhitespaceTrim(); String expectedPatternString = "\\Q-\\E\\s+"; assertThat(pattern.toString()).isEqualTo(expectedPatternString); StringBuilder templateText = null; Matcher matcher = null; templateText = new StringBuilder().append("- "); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(true); templateText = new StringBuilder().append("- \n\r\t"); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(true); templateText = new StringBuilder().append("- abcd"); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(true); templateText = new StringBuilder().append(" "); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(false); templateText = new StringBuilder().append("-"); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(false); templateText = new StringBuilder().append(" abcd - }"); matcher = pattern.matcher(templateText); assertThat(matcher.lookingAt()).isEqualTo(false); }