code: def test_character_postings():
      content = u("alfa bravo charlie bravo alfa alfa")
      assert _roundtrip(content, Characters(), "characters") == [
          ("alfa", [(0, 0, 4), (4, 25, 29), (5, 30, 34)]),
          ("bravo", [(1, 5, 10), (3, 19, 24)]),
          ("charlie", [(2, 11, 18)]),
      ]
      assert _roundtrip(content, Characters(), "positions") == [
          ("alfa", [0, 4, 5]),
          ("bravo", [1, 3]),
          ("charlie", [2]),
      ]
      assert _roundtrip(content, Characters(), "frequency") == [
          ("alfa", 3),
          ("bravo", 2),
          ("charlie", 1),
      ]
  
file_path: whoosh/tests/test_postings.py
imports: from __future__ import with_statement
  from whoosh import analysis, fields
  from whoosh.compat import u
  from whoosh.codec import default_codec
  from whoosh.formats import Existence, Frequency
  from whoosh.formats import Positions, PositionBoosts
  from whoosh.formats import Characters, CharacterBoosts
  from whoosh.util.testing import TempStorage
label_desc: Use image node_id 5 for calling a global function with example usage: test_character_postings() without return types