;; ;; test sxml tools ;; ;; ssax test is derived from the original SSAX source. ;; We use 'load' instead of 'include'. ssax-test.scm is a generated file ;; and in case of out-of-tree build it resides in a build directory while ;; this file (test.scm) is in a source directory, so 'include' can't ;; find ssax-test.scm with a relative pathname. OTOH, 'load' uses current ;; directory for files starting with "./". (load "./ssax-test.scm") ;(load "./tree-trans-test.scm") ;(load "./to-html-test.scm") ;; module consistency. (use gauche.test) (test-start "SXML auxiliary utilities") (test-section "sxml.tools") (use sxml.tools) (test-module 'sxml.tools) (use text.tree) (define (test-xml-html msg sxml xml-expect html-expect) (test* #"sxml:sxml->xml ~msg" xml-expect (tree->string (sxml:sxml->xml sxml))) (test* #"sxml:sxml->html ~msg" html-expect (tree->string (sxml:sxml->html sxml)))) ;; Check rendering quirks ;; https://github.com/shirok/Gauche-makiki/issues/11 (test-xml-html "attrs" '(body (div (@ (foo "") (bar "abc\"def") (baz:quux xyzzy)))) "