Module: Localite::Format::Etest

Defined in:
lib/localite/format.rb

Instance Method Summary collapse

Instance Method Details

#test_formatObject



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/localite/format.rb', line 22

def test_format
  assert_equal "xxx", Localite::Format.html("xxx")
  assert_equal "xxx", Localite::Format.html("html:xxx")
  assert_equal "xxx", Localite::Format.html("text:xxx")
  
  assert_equal "&lt;&gt;", Localite::Format.html("text:<>")
  assert_equal "&lt;&gt;", Localite::Format.html("<>")
  assert_equal "<>", Localite::Format.html("html:<>")

  assert_equal "xxx\nyyy", Localite::Format.html("xxx\nyyy")
  assert_equal "xxx\nyyy", Localite::Format.html("html:xxx\nyyy")
  assert_equal "xxx\nyyy", Localite::Format.html("text:xxx\nyyy")
end