@Test
void testLeadingWhitespaceTrimRegex() {

   
attern pattern = syntax.getRegexLeadingWhitespaceTrim();
*
"-" followed by one more whitespace characters
*/
  String expectedPatternString = "\\Q-\\E\\s+";
  // verify that the regex in the Syntax class is the expected pattern string
  assertThat(pattern.toString()).isEqualTo(expectedPatternString);
  
  StringBuilder templateText = null;
  Matcher matcher = null;
  
  // Dash followed by spaces should match
  templateText = new StringBuilder().append("- 	");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(true);
  
  // Dash character followed by whitespace characters should match
  templateText = new StringBuilder().append("- \n\r\t");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(true);
  
  // Trailing non-whitespace after whitespace characters should match
  templateText = new StringBuilder().append("- abcd");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(true);
  
  // No leading dash character should not match
  templateText = new StringBuilder().append("     ");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(false);
  
  // No trailing space character should not match
  templateText = new StringBuilder().append("-");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(false);
  
  // Leading characters should not match
  templateText = new StringBuilder().append(" abcd - 	}");
  matcher = pattern.matcher(templateText);
  assertThat(matcher.lookingAt()).isEqualTo(false);
}