public void testSoyCommandRegex()

in javatests/com/google/cloud/deploymentmanager/autogen/soy/PreprocessorTest.java [51:80]


  public void testSoyCommandRegex() {
    assertTrue(SOY_COMMAND_REGEX.matcher("{template abc kind=\"text\"}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{if $a > $b}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{/for}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{@param $a: string}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{@param? $a: string}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{param $p: 'abc'/}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{print $a |capitalized}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{sp}").matches());
    assertTrue(SOY_COMMAND_REGEX.matcher("{lb}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{$param}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{ $param }").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{'abc'}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("some{sp}text").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("some text").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{{ jinja_variable }}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{{ jinja_variable -}}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{{- jinja_variable }}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{{- jinja_variable -}}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{% if jinja_boolean %}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{%- if jinja_boolean -%}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{% if jinja_boolean -%}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{%- if jinja_boolean %}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{%- if jinja_boolean -%}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{# jinja comment #}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{# jinja comment -#}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{#- jinja comment #}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("{#- jinja comment -#}").matches());
    assertFalse(SOY_COMMAND_REGEX.matcher("<head>").matches());
  }