Test output for ersatz [ok]
Testing time: 0s
/home/mario/local/chicken-4.8.0.3/bin/csi -script run.scm < /dev/null -- testing runtime test ------------------------------------------------------ -- testing tvalue string representation ---------------------------------- (->string (Tstr "a")) ............................................ [ PASS] (->string (Tint 1)) .............................................. [ PASS] (->string (Tfloat 1.0)) .......................................... [ PASS] (->string (Tfloat 1.2)) .......................................... [ PASS] (->string (Tlist (list (Tint 0) (Tint 1)))) ...................... [ PASS] (->string (Tobj (list (cons 'name (Tstr "value"))))) ............. [ PASS] 6 tests completed in 0.001 seconds. 6 out of 6 (100%) tests passed. -- done testing tvalue string representation ----------------------------- -- testing arithmetic and logic ------------------------------------------ (op-plus (Tint 1) (Tint 1)) ...................................... [ PASS] (op-plus (Tfloat 1.0) (Tfloat 1.0)) .............................. [ PASS] (op-minus (Tint 1) (Tint 1)) ..................................... [ PASS] (op-minus (Tint 1) (Tint -1)) .................................... [ PASS] (op-minus (Tint 0) (Tfloat 1.0)) ................................. [ PASS] (op-minus (Tint 1) (Tfloat 0.0)) ................................. [ PASS] (tval-equal? (op-abs (Tint -1) kwargs) (Tint 1)) ................. [ PASS] (tval-equal? (op-abs (Tint 1) kwargs) (Tint 1)) .................. [ PASS] (tval-equal? (op-round (Tstr "floor") (Tfloat 1.5) kwargs) (Tfl... [ PASS] (tval-equal? (op-round (Tstr "ceil") (Tfloat 1.5) kwargs) (Tflo... [ PASS] (tval-equal? (op-range (Tint 0) (Tint 2) kwargs) (Tlist (list (... [ PASS] (tval-equal? (op-range (Tint 2) (Tint 0) kwargs) (Tlist (list (... [ PASS] (tval-equal? (op-range (Tint 2012) (Tint 2006) kwargs) (Tlist (... [ PASS] (tval-equal? (op-times (Tint 0) (Tint 1)) (Tint 0)) .............. [ PASS] (tval-equal? (op-times (Tint 1) (Tint 1)) (Tint 1)) .............. [ PASS] (tval-equal? (op-times (Tint 2) (Tint 2)) (Tint 4)) .............. [ PASS] (tval-equal? (op-times (Tint 2) (Tint 3)) (Tint 6)) .............. [ PASS] (tval-equal? (op-times (Tfloat 1.0) (Tint 2)) (Tfloat 2.0)) ...... [ PASS] (tval-equal? (op-times (Tfloat 2.0) (Tfloat 2.0)) (Tfloat 4.0)) .. [ PASS] (tval-equal? (op-times (Tfloat 2.0) (Tfloat 3.0)) (Tfloat 6.0)) .. [ PASS] (tval-equal? (op-times (Tfloat 0.0) (Tfloat 2.0)) (Tfloat 0.0)) .. [ PASS] (tval-equal? (op-times (Tfloat 0.0) (Tint 1)) (Tfloat 0.0)) ...... [ PASS] (tval-equal? (op-power (Tint 2) (Tint -1)) (Tfloat 1.0)) ......... [ PASS] (tval-equal? (op-power (Tint 2) (Tint 0)) (Tfloat 1.0)) .......... [ PASS] (tval-equal? (op-power (Tint 2) (Tint 1)) (Tfloat 2.0)) .......... [ PASS] (tval-equal? (op-power (Tint 2) (Tint 10)) (Tfloat 1024.0)) ...... [ PASS] (tval-equal? (op-div (Tint 4) (Tint 2)) (Tint 2)) ................ [ PASS] (tval-equal? (op-div (Tfloat 4.0) (Tint 2)) (Tfloat 2.0)) ........ [ PASS] (tval-equal? (op-mod (Tint 4) (Tint 3)) (Tint 1)) ................ [ PASS] (tval-equal? (op-mod (Tint 4) (Tint 1)) (Tint 0)) ................ [ PASS] (tval-equal? (op-and (Tbool #t) (Tbool #t)) (Tbool #t)) .......... [ PASS] (tval-equal? (op-and (Tbool #t) (Tbool #f)) (Tbool #f)) .......... [ PASS] (tval-equal? (op-and (Tbool #f) (Tbool #t)) (Tbool #f)) .......... [ PASS] (tval-equal? (op-and (Tbool #f) (Tbool #f)) (Tbool #f)) .......... [ PASS] (tval-equal? (op-or (Tbool #t) (Tbool #t)) (Tbool #t)) ........... [ PASS] (tval-equal? (op-or (Tbool #t) (Tbool #f)) (Tbool #t)) ........... [ PASS] (tval-equal? (op-or (Tbool #f) (Tbool #t)) (Tbool #t)) ........... [ PASS] (tval-equal? (op-or (Tbool #f) (Tbool #f)) (Tbool #f)) ........... [ PASS] (tval-equal? (op-toint (Tint 1) kwargs) (Tint 1)) ................ [ PASS] (tval-equal? (op-toint (Tfloat 1.0) kwargs) (Tint 1)) ............ [ PASS] (tval-equal? (op-tofloat (Tint 1) kwargs) (Tfloat 1.0)) .......... [ PASS] (tval-equal? (op-tofloat (Tfloat 1.0) kwargs) (Tfloat 1.0)) ...... [ PASS] 42 tests completed in 0.003 seconds. 42 out of 42 (100%) tests passed. -- done testing arithmetic and logic ------------------------------------- -- testing list equality ------------------------------------------------- (tval-equal? (Tbool #t) (list-same lst1 lst2)) ................... [ PASS] (tval-equal? (Tbool #f) (list-same lst1 lst3)) ................... [ PASS] (tval-equal? (Tbool #f) (list-same lst1 lst4)) ................... [ PASS] 3 tests completed in 0.001 seconds. 3 out of 3 (100%) tests passed. -- done testing list equality -------------------------------------------- -- testing object equality ----------------------------------------------- (tval-equal? (Tbool #t) (obj-same obj1 obj2)) .................... [ PASS] (tval-equal? (Tbool #f) (obj-same obj1 obj3)) .................... [ PASS] (tval-equal? (Tbool #t) (obj-same obj1 obj4)) .................... [ PASS] 3 tests completed in 0.0 seconds. 3 out of 3 (100%) tests passed. -- done testing object equality ------------------------------------------ -- testing eq-eq --------------------------------------------------------- (tval-equal? (eq-eq (Tint 1) (Tint 1)) (Tbool #t)) ............... [ PASS] (tval-equal? (eq-eq (Tint 1) (Tfloat 1.0)) (Tbool #f)) ........... [ PASS] (tval-equal? (eq-eq (Tfloat 1.0) (Tfloat 1.0)) (Tbool #t)) ....... [ PASS] (tval-equal? (eq-eq (Tstr "aaa") (Tstr "aaa")) (Tbool #t)) ....... [ PASS] (tval-equal? (eq-eq (Tstr "aaa") (Tstr "bbb")) (Tbool #f)) ....... [ PASS] (tval-equal? (eq-eq (Tstr "日本語") (Tstr "日本語")) (Tbo... [ PASS] (tval-equal? (eq-eq (Tstr "日本語") (Tstr "英語")) (Tbool ... [ PASS] (tval-equal? (eq-eq (Tstr "aaa") (Tint 0)) (Tbool #f)) ........... [ PASS] 8 tests completed in 0.0 seconds. 8 out of 8 (100%) tests passed. -- done testing eq-eq ---------------------------------------------------- -- testing string operations --------------------------------------------- upper ............................................................ [ PASS] lower ............................................................ [ PASS] join ............................................................. [ PASS] substring ........................................................ [ PASS] substring ........................................................ [ PASS] substring ........................................................ [ PASS] substring ........................................................ [ PASS] replace .......................................................... [ PASS] replace .......................................................... [ PASS] replace .......................................................... [ PASS] truncate ......................................................... [ PASS] capitalize ....................................................... [ PASS] escape-html ...................................................... [ PASS] wordcount ........................................................ [ PASS] wordcount ........................................................ [ PASS] urlize ........................................................... [ PASS] title ............................................................ [ PASS] striptags ........................................................ [ PASS] 18 tests completed in 0.001 seconds. 18 out of 18 (100%) tests passed. -- done testing string operations ---------------------------------------- -- testing sorting ------------------------------------------------------- (tval-equal? (op-sort lst kwargs) (Tlist (list (Tint 1) (Tint 2... [ PASS] (tval-equal? (op-sort lst kwargs) (Tlist (list (Tfloat 1.0) (Tf... [ PASS] (tval-equal? (op-sort lst kwargs) (Tlist (list (Tstr "aa") (Tst... [ PASS] 3 tests completed in 0.0 seconds. 3 out of 3 (100%) tests passed. -- done testing sorting -------------------------------------------------- -- testing length -------------------------------------------------------- (tval-equal? (op-length (Tstr "test") kwargs) (Tint 4)) .......... [ PASS] (tval-equal? (op-length (Tstr "日本語") kwargs) (Tint 3)) ..... [ PASS] (tval-equal? (op-length (Tlist (list (Tint 0) (Tint 1))) kwargs... [ PASS] 3 tests completed in 0.0 seconds. 3 out of 3 (100%) tests passed. -- done testing length --------------------------------------------------- reverse .............................................................. [ PASS] slice ................................................................ [ PASS] last ................................................................. [ PASS] default .............................................................. [ PASS] list ................................................................. [ PASS] sublist .............................................................. [ PASS] expand and escape .................................................... [ PASS] safe expand .......................................................... [ PASS] expand with filter ................................................... [ PASS] if ................................................................... [ PASS] loop index/revindex .................................................. [ PASS] loop cycle ........................................................... [ PASS] loop first ........................................................... [ PASS] loop last ............................................................ [ PASS] loop length .......................................................... [ PASS] in ................................................................... [ PASS] is ................................................................... [ PASS] is ................................................................... [ PASS] set .................................................................. [ PASS] set/with ............................................................. [ PASS] defined .............................................................. [ PASS] defined .............................................................. [ PASS] extends .............................................................. [ PASS] include .............................................................. [ PASS] macro ................................................................ [ PASS] caller ............................................................... [ PASS] filter ............................................................... [ PASS] set .................................................................. [ PASS] make-lexer-table ..................................................... [ PASS] 29 tests and 8 subgroups completed in 0.196 seconds. 29 out of 29 (100%) tests passed. 8 out of 8 (100%) subgroups passed. -- done testing runtime test ------------------------------------------------- include test ============ <h1>this is included source</h1> binop ====== 1+1 = 2 1-1 = 0 2*4 = 8 4/2 = 2 8^3 = 512.0 8%3 = 2 not true = false not true(2) = false single quote string test ========================= single_quoted = hoge expand test =========== expand with escape = <script>alert(1)</script> expand with safe = <script>alert(1)</script> set test ========= set hoge = "ok" now hoge = ok if test ======= value of hoge == "ok" for test ======== <p>1</p> <p>1</p> <p>tmp = 1</p> <p>2</p> <p>2</p> <p>tmp = 2</p> <p>3</p> <p>3</p> <p>tmp = 3</p> <p>4</p> <p>1</p> <p>tmp = 4</p> <p>5</p> <p>2</p> <p>tmp = 5</p> <a href="http://yahoo.co.jp">yahoo japan</a> <a href="http://yahoo.co.jp">yahoo japan</a> <a href="http://google.co.jp">google japan</a> <a href="http://yahoo.co.jp">yahoo japan</a> <a href="http://google.co.jp">google japan</a> obj test ========= name = aa age = 10 obj["name"] = aa obj["age"] = 10 filter test =========== upper test:MUST BE UPPER word count for "hoge hage hige" = 3 func test ========= range(0,3) = 0123 range(3,0) = 3210 strlen("testtest") = 8 strlen("日本語") = 3 round floor of 1.5 = 1 round ceil of 1.5 = 2 join(",", [1,2,3,4,5]) = 1,2,3,4,5 1,1 = 10 2,1 = 20 3,1 = 30 4,1 = 40 1,2 = 50 2,2 = 60 3,2 = 70 4,2 = 80 1,3 = 90 2,3 = 100 filter tag test =============== MUST BE UPPER list expr ========= 1234.5str 1-2-3 {{ syntax test "is" ================ 6 is divisibleby 4 = false 6 is divisibleby 3 = true 6 is divisibleby 2 = true 6 is divisibleby 2 = true 6 is divisibleby 3 via func = true macro test ========== 10,20 10 20 from inner text! args of call = 1,2 macro name = delay_macro via caller = true to <a name="#about"></a> <h2>about me</h2> Hi, I'm a programmer living in Japan. <a href="#top">back to top</a> <a name="#language"></a> <h2>favorite language</h2> I love Scheme. <a href="#top">back to top</a> this is test macro x = 10, y = 20 this is test macro x = 30, y = 40 this is other macro x = 50, y = 60 this is test_caller age=120 class=mytest name=test_caller caller=true catch_kwargs=true catch_vargs=false kw_from_test_caller=yeah with statement test ==================== inner with foo = 10, hoge = 20 after with foo = , hoge = ok inner with hige = 20 hige is defined = true after with hige = hige is defined = false in expr test ============= 1 is in [1,2,3] = true yes! 1 is in [1,2,3] autoescape test =============== autoescape = true <script></script> autoescape = false <script></script> obj literal =========== person["age"] = 10 person.age = 10 person["name"] = taro person.name = taro eval ==== from eval!