#!/usr/bin/env ruby
# $Id: tc_wikitext.rb,v 1.27 2004/04/16 14:39:08 eto Exp $
# Copyright (C) 2003-2004 Kouichirou Eto, All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
# You can redistribute it and/or modify it under the terms of the GNU GPL2.

$LOAD_PATH.unshift('../../lib')
$LOAD_PATH.unshift('../../compat')
require 'test/unit'
require 'qwik/wikitext'

class TC_WikiText < Test::Unit::TestCase
  def test_wikitext
    assert_instance_of(Hiki::HikiStack, "a".w.tokens)
    assert_equal("<p>a</p>\n", "a".w.format)
    assert_instance_of(REXML::Document, "a".w.xml)
    assert_equal("<body><p>a</p>\n</body>", "a".w.xml.to_s)
#    assert_equal("\n<body\n  ><p>a</p\n  ></body\n>", "a".w.xml.to_xhtml(0))
    assert_equal("<body><p>a</p>\n</body>", "a".w.res.to_s)
    assert_equal("<p>a</p>", "a".w.html)
  end
end
