static void test_strings()
{
  char* str = "---- abc ---- xyz";
  uint8_t blob[] = "---- a\0b\0c\0 -\0-\0-\0-\0x\0y\0z\0";

  assert_true_rule(
      "rule test { strings: $a = \"a\" condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"ab\" condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"abc\" condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"xyz\" condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"abc\" nocase fullword condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"aBc\" nocase  condition: $a }",
      str);

  assert_true_rule(
      "rule test { strings: $a = \"abc\" fullword condition: $a }",
      str);

  assert_false_rule(
      "rule test { strings: $a = \"a\" fullword condition: $a }",
      str);

  assert_false_rule(
      "rule test { strings: $a = \"ab\" fullword condition: $a }",
      str);

  assert_false_rule(
      "rule test { strings: $a = \"abc\" wide fullword condition: $a }",
      str);

  assert_true_rule_blob(
      "rule test { strings: $a = \"a\" wide condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"a\" wide ascii condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"ab\" wide condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"ab\" wide ascii condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"abc\" wide condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"abc\" wide nocase fullword condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"aBc\" wide nocase condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"aBc\" wide ascii nocase condition: $a }",
      blob);

  assert_true_rule_blob(
      "rule test { strings: $a = \"---xyz\" wide nocase condition: $a }",
      blob);

  assert_true_rule(
      "rule test { strings: $a = \"abc\" fullword condition: $a }",
      "abc");

  assert_false_rule(
      "rule test { strings: $a = \"abc\" fullword condition: $a }",
      "xabcx");

  assert_false_rule(
      "rule test { strings: $a = \"abc\" fullword condition: $a }",
      "xabc");

  assert_false_rule(
      "rule test { strings: $a = \"abc\" fullword condition: $a }",
      "abcx");

  assert_false_rule(
      "rule test { strings: $a = \"abc\" ascii wide fullword condition: $a }",
      "abcx");

  assert_true_rule_blob(
      "rule test { strings: $a = \"abc\" ascii wide fullword condition: $a }",
      "a\0abc");

  assert_true_rule_blob(
      "rule test { strings: $a = \"abc\" wide fullword condition: $a }",
      "a\0b\0c\0");

  assert_false_rule_blob(
      "rule test { strings: $a = \"abc\" wide fullword condition: $a }",
      "x\0a\0b\0c\0x\0");

  assert_false_rule_blob(
      "rule test { strings: $a = \"ab\" wide fullword condition: $a }",
      "x\0a\0b\0");

  assert_false_rule_blob(
      "rule test { strings: $a = \"abc\" wide fullword condition: $a }",
      "x\0a\0b\0c\0");

  assert_true_rule_blob(
      "rule test { strings: $a = \"abc\" wide fullword condition: $a }",
      "x\001a\0b\0c\0");

  assert_true_rule(
      "rule test {\n\
         strings:\n\
             $a = \"abcdef\"\n\
             $b = \"cdef\"\n\
             $c = \"ef\"\n\
         condition:\n\
             all of them\n\
       }", "abcdef");
}