]> gitweb.factorcode.org Git - factor.git/commitdiff
Updating other vocabs for XML changes
authorDaniel Ehrenberg <littledan@Macintosh-103.local>
Tue, 27 Jan 2009 19:38:13 +0000 (13:38 -0600)
committerDaniel Ehrenberg <littledan@Macintosh-103.local>
Tue, 27 Jan 2009 19:38:13 +0000 (13:38 -0600)
basis/lcs/diff2html/diff2html-tests.factor [new file with mode: 0644]
basis/xml-rpc/xml-rpc.factor
basis/xml/tests/arithmetic.factor [deleted file]
extra/4DNav/space-file-decoder/space-file-decoder.factor

diff --git a/basis/lcs/diff2html/diff2html-tests.factor b/basis/lcs/diff2html/diff2html-tests.factor
new file mode 100644 (file)
index 0000000..d261a46
--- /dev/null
@@ -0,0 +1,6 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: lcs.diff2html lcs kernel tools.test strings sequences xml.writer ;
+IN: lcs.diff2html.tests
+
+[ ] [ "hello" "heyo" [ 1string ] { } map-as diff htmlize-diff xml-chunk>string drop ] unit-test
index d2fd111b39df3ecc690da63446e46cb2ae2b3db9..52e175ca3a82ca575f833cf1ef6e25932c7e0c79 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors kernel xml arrays math generic http.client
 combinators hashtables namespaces io base64 sequences strings
 calendar xml.data xml.writer xml.utilities assocs math.parser
-debugger calendar.format math.order xml.interpolate ;
+debugger calendar.format math.order xml.interpolate xml.dispatch ;
 IN: xml-rpc
 
 ! * Sending RPC requests
@@ -15,7 +15,7 @@ GENERIC: item>xml ( object -- xml )
 M: integer item>xml
     dup 31 2^ neg 31 2^ 1 - between?
     [ "Integers must fit in 32 bits" throw ] unless
-    number>string [XML <i4><-></i4> XML] ;
+    [XML <i4><-></i4> XML] ;
 
 UNION: boolean t POSTPONE: f ;
 
@@ -176,10 +176,3 @@ TAG: array xml>item
 
 : invoke-method ( params method url -- )
     [ swap <rpc-method> ] dip post-rpc ;
-
-: put-http-response ( string -- )
-    "HTTP/1.1 200 OK\nConnection: close\nContent-Length: " write
-    dup length number>string write
-    "\nContent-Type: text/xml\nDate: " write
-    now timestamp>http-string write "\n\n" write
-    write ;
diff --git a/basis/xml/tests/arithmetic.factor b/basis/xml/tests/arithmetic.factor
deleted file mode 100644 (file)
index 98facfc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-! Copyright (C) 2005, 2006 Daniel Ehrenberg
-! See http://factorcode.org/license.txt for BSD license.
-IN: xml.tests
-USING: xml io kernel math sequences strings xml.utilities tools.test math.parser ;
-
-PROCESS: calculate ( tag -- n )
-
-: calc-2children ( tag -- n n )
-    children-tags first2 [ calculate ] dip calculate ;
-
-TAG: number calculate
-    children>string string>number ;
-TAG: add calculate
-    calc-2children + ;
-TAG: minus calculate
-    calc-2children - ;
-TAG: times calculate
-    calc-2children * ;
-TAG: divide calculate
-    calc-2children / ;
-TAG: neg calculate
-    children-tags first calculate neg ;
-
-: calc-arith ( string -- n )
-    string>xml first-child-tag calculate ;
-
-[ 32 ] [
-    "<math><times><add><number>1</number><number>3</number></add><neg><number>-8</number></neg></times></math>"
-    calc-arith
-] unit-test
index 158917ca3eaa5651cc77fa61e979b52ba9101a31..8ef5c9e906a454486da8c7d6ff6e5e4f9755cdf7 100755 (executable)
@@ -1,17 +1,7 @@
 ! Copyright (C) 2008 Jeff Bigot\r
 ! See http://factorcode.org/license.txt for BSD license.\r
-USING: adsoda\r
-xml\r
-xml.utilities\r
-accessors\r
-combinators\r
-sequences\r
-math.parser\r
-kernel\r
-splitting\r
-values\r
-continuations\r
-;\r
+USING: adsoda xml xml.utilities xml.dispatch accessors combinators\r
+sequences math.parser kernel splitting values continuations ;\r
 IN: 4DNav.space-file-decoder\r
 \r
 : decode-number-array ( x -- y )  "," split [ string>number ] map ;\r