From f4c426f41aa9d19330cd365e9a31a42d79e67b94 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Mon, 11 Jul 2011 15:59:42 -0400 Subject: [PATCH] images look like they're working --- examples/logo.rkt | 6 +++++- js-assembler/runtime-src/baselib-lists.js | 10 +++++----- tests/more-tests/lists.expected | 2 ++ tests/more-tests/lists.rkt | 4 ++++ tests/run-more-tests.rkt | 1 + 5 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 tests/more-tests/lists.expected create mode 100644 tests/more-tests/lists.rkt diff --git a/examples/logo.rkt b/examples/logo.rkt index 3b150ca..48209f1 100644 --- a/examples/logo.rkt +++ b/examples/logo.rkt @@ -2,4 +2,8 @@ (require (planet dyoo/whalesong/image)) -(image-url "http://racket-lang.org/logo.png") + +(define lst + (list (image-url "http://racket-lang.org/logo.png") + (image-url "http://www.bootstrapworld.org/images/icon.gif"))) +(list lst lst) diff --git a/js-assembler/runtime-src/baselib-lists.js b/js-assembler/runtime-src/baselib-lists.js index 3bb17d6..7247b77 100644 --- a/js-assembler/runtime-src/baselib-lists.js +++ b/js-assembler/runtime-src/baselib-lists.js @@ -131,19 +131,19 @@ node.appendChild(document.createTextNode("(")); var p = this; while ( p instanceof Cons ) { - appendChild(node, plt.baselib.format.toDomNode(p.first, cache)); + node.appendChild(plt.baselib.format.toDomNode(p.first, cache)); p = p.rest; if ( p !== Empty.EMPTY ) { - appendChild(node, document.createTextNode(" ")); + node.appendChild(document.createTextNode(" ")); } if (typeof(p) === 'object' && cache.containsKey(p)) { break; } } if ( p !== Empty.EMPTY ) { - appendChild(node, document.createTextNode(".")); - appendChild(node, document.createTextNode(" ")); - appendChild(node, plt.baselib.format.toDomNode(p, cache)); + node.appendChild(document.createTextNode(".")); + node.appendChild(document.createTextNode(" ")); + node.appendChild(plt.baselib.format.toDomNode(p, cache)); } node.appendChild(document.createTextNode(")")); diff --git a/tests/more-tests/lists.expected b/tests/more-tests/lists.expected new file mode 100644 index 0000000..e2c66cf --- /dev/null +++ b/tests/more-tests/lists.expected @@ -0,0 +1,2 @@ +(1 2 3) +("hello" "world") diff --git a/tests/more-tests/lists.rkt b/tests/more-tests/lists.rkt new file mode 100644 index 0000000..0c482e4 --- /dev/null +++ b/tests/more-tests/lists.rkt @@ -0,0 +1,4 @@ +#lang planet dyoo/whalesong + +'(1 2 3) +(list "hello" "world") diff --git a/tests/run-more-tests.rkt b/tests/run-more-tests.rkt index 59935a7..272ee0d 100644 --- a/tests/run-more-tests.rkt +++ b/tests/run-more-tests.rkt @@ -14,3 +14,4 @@ (test "more-tests/man-vs-boy.rkt") (test "more-tests/colors.rkt") (test "more-tests/images.rkt") +(test "more-tests/lists.rkt") \ No newline at end of file