up
svn: r13896
This commit is contained in:
parent
5786c0d936
commit
e51ea7f217
|
@ -2,7 +2,8 @@
|
|||
;; warning - this was copied from the XML collection.
|
||||
;; It needs to be abstracted back in.
|
||||
#lang scheme
|
||||
(require xml)
|
||||
(require xml
|
||||
(prefix-in scheme: scheme))
|
||||
|
||||
;; Kid-lister : (Symbol -> (U (listof Symbol) #f))
|
||||
(define kid-lister/c
|
||||
|
@ -18,6 +19,9 @@
|
|||
[gen-may-contain (spec/c . -> . kid-lister/c)]
|
||||
[gen-read-sgml (kid-lister/c (symbol? symbol? . -> . (or/c symbol? false/c)) . -> . (() (input-port?) . ->* . (listof content/c)))])
|
||||
|
||||
(define (file-position in)
|
||||
(make-location 0 0 (scheme:file-position in)))
|
||||
|
||||
;; Start-tag ::= (make-start-tag Location Location Symbol (listof Attribute))
|
||||
(define-struct (start-tag source) (name attrs))
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#lang scheme
|
||||
(require (planet schematics/schemeunit:3)
|
||||
(planet schematics/schemeunit:3/text-ui)
|
||||
net/url
|
||||
(prefix-in h: html)
|
||||
(prefix-in x: xml))
|
||||
|
||||
|
@ -40,6 +41,12 @@
|
|||
'()]))]
|
||||
|
||||
(check-equal? (extract-pcdata an-html)
|
||||
' ("My title" "Hello world" "Testing" "!"))))))
|
||||
' ("My title" "Hello world" "Testing" "!"))))
|
||||
|
||||
|
||||
(test-case "Eli - March 1"
|
||||
(check-not-false (lambda () (h:read-html-as-xml (get-pure-port (string->url "http://list.cs.brown.edu/pipermail/plt-scheme/"))))))
|
||||
|
||||
))
|
||||
|
||||
(run-tests html-tests)
|
||||
|
|
Loading…
Reference in New Issue
Block a user