# Copyright (C) 2003-2005 Kouichirou Eto, All rights reserved.

module Qwik
  class Action
    def plg_code(lang=nil)
      b = ""
      b = yield if block_given?
      [:div, {:class=>"code"},
	[:pre, b]
      ]
    end
  end
end

if $0 == __FILE__
  $LOAD_PATH << "../../lib" unless $LOAD_PATH.include?("../../lib")
  require "t/test"
  $debug = true
end

if $debug
  class TC_ActCode < Test::Unit::TestCase
    include TestSession

    def test_code
      session("/")
      assert_wiki([:div, {:class=>"code"}, [:pre, "t"]], "{{code\nt\n}}")
    end
  end
end
