--- /dev/null
+! 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
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
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 ;
: 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 ;
+++ /dev/null
-! 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
! 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