From 1d0c069a6caf601dab582a67aeec735ff682583b Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 29 May 2010 12:18:58 -0400 Subject: [PATCH] Moved unstable/cce/web to unstable/web. --- collects/tests/unstable/web.rkt | 16 ++++++++++++++ collects/unstable/cce/reference/manual.scrbl | 1 - collects/unstable/cce/test/test-main.ss | 6 ++--- collects/unstable/cce/test/test-web.ss | 22 ------------------- collects/unstable/scribblings/unstable.scrbl | 1 + .../{cce/reference => scribblings}/web.scrbl | 14 +++++------- collects/unstable/{cce/web.ss => web.rkt} | 9 ++------ 7 files changed, 27 insertions(+), 42 deletions(-) create mode 100644 collects/tests/unstable/web.rkt delete mode 100644 collects/unstable/cce/test/test-web.ss rename collects/unstable/{cce/reference => scribblings}/web.scrbl (85%) rename collects/unstable/{cce/web.ss => web.rkt} (95%) diff --git a/collects/tests/unstable/web.rkt b/collects/tests/unstable/web.rkt new file mode 100644 index 0000000000..065fa01567 --- /dev/null +++ b/collects/tests/unstable/web.rkt @@ -0,0 +1,16 @@ +#lang racket + +(require rackunit rackunit/text-ui unstable/web "helpers.rkt") + +(run-tests + (test-suite "web.ss" + (test-suite "css?" + (test-true "CSS" (css? '((foo (a b) (c d)) (bar (w x) (y z))))) + (test-false "not CSS" (css? '(a b c d)))) + (test-suite "css/c" + (test-ok "CSS" (with/c css/c '((foo (a b) (c d)) (bar (w x) (y z))))) + (test-bad "not CSS" (with/c css/c '(a b c d)))) + (test-suite "write-css") + (test-suite "write-xexpr") + (test-suite "create-stylesheet") + (test-suite "create-webpage"))) diff --git a/collects/unstable/cce/reference/manual.scrbl b/collects/unstable/cce/reference/manual.scrbl index 1866a1c930..2728b1139f 100644 --- a/collects/unstable/cce/reference/manual.scrbl +++ b/collects/unstable/cce/reference/manual.scrbl @@ -11,7 +11,6 @@ @table-of-contents[] @include-section["regexp.scrbl"] -@include-section["web.scrbl"] @include-section["set.scrbl"] @include-section["dict.scrbl"] diff --git a/collects/unstable/cce/test/test-main.ss b/collects/unstable/cce/test/test-main.ss index 842aae451d..80f4a83802 100644 --- a/collects/unstable/cce/test/test-main.ss +++ b/collects/unstable/cce/test/test-main.ss @@ -16,8 +16,7 @@ "test-sandbox.ss" "test-scribble.ss" "test-set.ss" - "test-syntax.ss" - "test-web.ss") + "test-syntax.ss") (run-tests (test-suite "scheme.plt" @@ -36,5 +35,4 @@ sandbox-suite scribble-suite set-suite - syntax-suite - web-suite)) + syntax-suite)) diff --git a/collects/unstable/cce/test/test-web.ss b/collects/unstable/cce/test/test-web.ss deleted file mode 100644 index 4c231cd4c7..0000000000 --- a/collects/unstable/cce/test/test-web.ss +++ /dev/null @@ -1,22 +0,0 @@ -#lang scheme - -(require "checks.ss" - "../web.ss") - -(provide web-suite) - -(define web-suite - (test-suite "web.ss" - (test-suite "css?" - (test-true "CSS" (css? '((foo (a b) (c d)) (bar (w x) (y z))))) - (test-false "not CSS" (css? '(a b c d)))) - (test-suite "css/c" - (test-ok "CSS" (with/c css/c '((foo (a b) (c d)) (bar (w x) (y z))))) - (test-bad "not CSS" (with/c css/c '(a b c d)))) - (test-suite "xexpr/c" - (test-ok "XExpr" (with/c xexpr/c '(a ([href "url"]) "somewhere"))) - (test-bad "not XExpr" (with/c xexpr/c '(a ("href" url) . "nowhere")))) - (test-suite "write-css") - (test-suite "write-xexpr") - (test-suite "create-stylesheet") - (test-suite "create-webpage"))) diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index f63a5c5cdc..c4ae6cedd4 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -87,6 +87,7 @@ Keep documentation and tests up to date. @include-section["syntax.scrbl"] @include-section["text.scrbl"] @include-section["values.scrbl"] +@include-section["web.scrbl"] @include-section["poly-c.scrbl"] @include-section["mutated-vars.scrbl"] @include-section["find.scrbl"] diff --git a/collects/unstable/cce/reference/web.scrbl b/collects/unstable/scribblings/web.scrbl similarity index 85% rename from collects/unstable/cce/reference/web.scrbl rename to collects/unstable/scribblings/web.scrbl index d4f5eaeb2d..28faf67dbf 100644 --- a/collects/unstable/cce/reference/web.scrbl +++ b/collects/unstable/scribblings/web.scrbl @@ -1,13 +1,11 @@ -#lang scribble/doc -@(require scribble/manual - scribble/eval - "../scribble.ss" - "eval.ss") -@(require (for-label scheme xml unstable/cce/web)) +#lang scribble/manual +@(require scribble/eval "utils.rkt" (for-label racket xml unstable/web)) -@title[#:style 'quiet #:tag "cce-web"]{XML and CSS} +@title{XML and CSS} -@defmodule[unstable/cce/web] +@defmodule[unstable/web] + +@unstable[@author+email["Carl Eastlund" "cce@racket-lang.org"]] This module provides tools for programmatic creation of static web pages. It is based on the XML collection; see documentation for @scheme[xexpr?]. diff --git a/collects/unstable/cce/web.ss b/collects/unstable/web.rkt similarity index 95% rename from collects/unstable/cce/web.ss rename to collects/unstable/web.rkt index 6b23f05a93..b55c25970d 100644 --- a/collects/unstable/cce/web.ss +++ b/collects/unstable/web.rkt @@ -1,8 +1,7 @@ -#lang scheme +#lang racket (require xml unstable/function - unstable/text - "define.ss") + unstable/text) ;; css/c : FlatContract ;; Recognizes representations of Cascading Style Sheets. @@ -68,10 +67,6 @@ ;; Writes a property value to a Cascading Style Sheet. (define write-prop-val write-text) -(define-if-unbound xexpr/c - (flat-named-contract "Xexpr" xexpr?)) - -(provide xexpr/c) (provide/contract [write-xexpr (->* [xexpr/c] [output-port?] void?)])