class TestResolveEtc

Public Instance Methods

test_all() click to toggle source
# File vendor/qwik/lib/qwik/resolve.rb, line 35
def test_all
  # test_br
  ok_wi [:p, 't', [:br], 's'], "t~\ns\n"
  eq "\342\200\276", '~'.set_sourcecode_charset.to_utf8     # test bug

  # test_resolve_ref
  ok_wi [:p, [:a, {:href=>'FrontPage.html'}, 'FrontPage']],
        '[[FrontPage]]'
  ok_wi [:p, [:a, {:href=>'FrontPage.html'}, 't']], '[[t|FrontPage]]'
  page = @site.create_new
  page.store '*あ'
  ok_wi [:p, [:a, {:href=>'2.html'}, 'あ']], "[[2]]"
  ok_wi [:p, [:a, {:href=>'2.html'}, 'あ']], '[[あ]]'

  # test_resolve_plugin
  ok_wi [:p, [:em, 't']], "''t''"
  ok_wi [:p, [:em, '']], "''{{qwik_null}}''"
  ok_wi [:p, [:strong, 't']], "'''t'''"
  ok_wi [:p, [:strong, '']], "'''{{qwik_null}}'''"
  ok_wi [:span, {:class=>"plg_error"}, "nosuch plugin | ",
    [:strong, "nosuchplugin"]], '{{nosuchplugin}}'

  ok_wi [:p, 'a ', ''], 'a {{qwik_null}}'
  ok_wi [:p, 'a ', '', ' b'], 'a {{qwik_null}} b'
end