description = '''
word boundary tests, cross-validated against the regex crate.
'''
[[test]]
name = "basic_boundary"
pattern = '(and|AND)\b(.*)'
input = "xxxxxANDyyyyy"
vs_regex = true
[[test]]
name = "basic_boundary"
pattern = '(and|AND)\b(.*)'
input = "xxxxxANDyyyyy"
vs_regex = true
[[test]]
name = "wb_bare_11"
pattern = '\b11\b'
input = "11"
vs_regex = true
[[test]]
name = "wb_leading_space"
pattern = '\b11\b'
input = " 11"
vs_regex = true
[[test]]
name = "wb_trailing_space"
pattern = '\b11\b'
input = "11 "
vs_regex = true
[[test]]
name = "wb_both_spaces"
pattern = '\b11\b'
input = " 11 "
vs_regex = true
[[test]]
name = "wb_long_word_12plus"
pattern = '\b[a-z]{12,}\b'
input = "hello extraordinary world"
vs_regex = true
[[test]]
name = "wb_long_word_no_match"
pattern = '\b[a-z]{12,}\b'
input = "hello world foo"
vs_regex = true
[[test]]
name = "wb_long_word_multiple"
pattern = '\b[a-z]{12,}\b'
input = "understanding communication"
vs_regex = true
[[test]]
name = "wb_long_word_mixed_case"
pattern = '\b[a-z]{12,}\b'
input = "THE understanding OF communication HERE"
vs_regex = true
[[test]]
name = "wb_long_word_at_start"
pattern = '\b[a-z]{12,}\b'
input = "extraordinary!"
vs_regex = true
[[test]]
name = "wb_long_word_at_end"
pattern = '\b[a-z]{12,}\b'
input = "!extraordinary"
vs_regex = true
[[test]]
name = "wb_exact_13"
pattern = '\b[a-z]{13}\b'
input = "hello world extraordinary"
vs_regex = true
[[test]]
name = "wb_exact_12_no_match"
pattern = '\b[a-z]{12}\b'
input = "hello world extraordinary"
vs_regex = true
[[test]]
name = "wb_word_plus"
pattern = '\b\w+\b'
input = "hello world"
vs_regex = true
[[test]]
name = "wb_digits"
pattern = '\b\d+\b'
input = "foo 123 bar"
vs_regex = true
[[test]]
name = "wb_lowercase_words"
pattern = '\b[a-z]+\b'
input = "hello WORLD foo"
vs_regex = true
[[test]]
name = "wb_partial_leading"
pattern = '\b11'
input = " 11"
vs_regex = true
[[test]]
name = "wb_partial_trailing"
pattern = '11\b'
input = "11 "
vs_regex = true
[[test]]
name = "wb_partial_trailing_bare"
pattern = '11\b'
input = "11"
vs_regex = true
[[test]]
name = "wb_contains_a"
pattern = '\b\w*a\w*\b'
input = "ffaff"
vs_regex = true
[[test]]
name = "wb_trailing_a"
pattern = 'a\b'
input = "a "
vs_regex = true
[[test]]
name = "wb_dash_boundary"
pattern = '\b-'
input = "1-2"
vs_regex = true
[[test]]
name = "wb_before_dash"
pattern = '1\b-'
input = "1-2"
vs_regex = true
[[test]]
name = "wb_across_dash"
pattern = '1\b-2'
input = "1-2"
vs_regex = true
[[test]]
name = "wb_no_match_embedded"
pattern = '\b11\b'
input = "a11b"
vs_regex = true
[[test]]
name = "wb_adjacent_words"
pattern = '\b[a-z]+\b'
input = "cat dog bird"
vs_regex = true
[[test]]
name = "wb_bounded_rep_at_boundary"
pattern = '\b[a-z]{3,5}\b'
input = "cat extraordinary dog bird"
vs_regex = true
[[test]]
name = "wb_whitespace_neighbor"
pattern = '\s\b[a-z]+\b\s'
input = " cat "
vs_regex = true
[[test]]
name = "wb_after_whitespace_class"
pattern = '[ \t]\b\w+'
input = " hello\tworld"
vs_regex = true
[[test]]
name = "wb_alpha_class_union"
pattern = '\b[a-zA-Z]+\b'
input = "Hello WORLD foo 123"
vs_regex = true
[[test]]
name = "wb_alnum_class"
pattern = '\b[a-zA-Z0-9]+\b'
input = "foo123 !bar! 42"
vs_regex = true
[[test]]
name = "wb_the_basic"
pattern = '\bthe\b'
input = "foo the bar"
vs_regex = true
[[test]]
name = "wb_the_multiple"
pattern = '\bthe\b'
input = "the cat and the dog and the fish"
vs_regex = true
[[test]]
name = "wb_the_no_match"
pattern = '\bthe\b'
input = "other breathe"
vs_regex = true
[[test]]
name = "wb_the_start_end"
pattern = '\bthe\b'
input = "the"
vs_regex = true
[[test]]
name = "wb_the_adjacent"
pattern = '\bthe\b'
input = "!the! .the. the"
vs_regex = true
[[test]]
name = "word_border_star"
pattern = '\bTrue\b *'
input = "True"
matches = [[0, 4]]
[[test]]
name = "word_border_req_word_trailing_no_match"
pattern = '!!\b'
input = "!!"
matches = []
[[test]]
name = "word_border_req_word_leading_no_match"
pattern = '\b!!'
input = "!!"
matches = []
[[test]]
name = "word_border_req_word_leading_match"
pattern = '\b!!'
input = "a!!"
matches = [[1, 3]]
[[test]]
name = "word_border_req_word_trailing_match"
pattern = '!!\b'
input = "!!a"
matches = [[0, 2]]
[[test]]
name = "word_boundary_ip_trailing_b_not_boundary"
pattern = '2(\.([0-1]?[0-9]{1,2}|2[0-4][0-9])){3}\b'
input = "2.3.3.3a!"
matches = []
[[test]]
name = "repro_unanchored_fwd_ascii_word"
pattern = '\w\w-\w\w'
input = "xxxxx00-00yyyyy"
matches = [[5, 10]]