 
   msg = (s) -> "returns bruteforce + match + bruteforce when match covers an infix: #{s}"
   matches = [m1] = [m(1, 8, 1)]
-  result = scoring.most_guessable_match_sequence password, matches
+  result = scoring.most_guessable_match_sequence password, matches, exclude_additive
   t.equal result.sequence.length, 3, msg("result.length == 3")
   t.equal result.sequence[1], m1, msg("middle match is the provided match object")
   m0 = result.sequence[0]


  msg = (s) -> "returns bruteforce + match when match covers a suffix: #{s}"
  matches = [m1] = [m(3, 9, 1)]
  result = scoring.most_guessable_match_sequence password, matches
  t.equal result.sequence.length, 2, msg("result.match.sequence.length == 2")
  m0 = result.sequence[0]
  t.equal m0.pattern, 'bruteforce', msg("first match is bruteforce")

  approx_equal t, log10(n), Math.log(n) / Math.log(10), "base change rule"
  t.end()

test 'search', (t) ->
  m = (i, j, guesses) ->
    i: i
    j: j
    guesses: guesses
  password = '0123456789'

  # for tests, set additive penalty to zero.
  exclude_additive = true

  msg = (s) -> "returns one bruteforce match given an empty match sequence: #{s}"
  result = scoring.most_guessable_match_sequence password, []
