2 # Copyright (C) 2009, Parrot Foundation.
11 test parrot to external Tcl connection
15 % prove t/library/tcl_lib.t
22 load_bytecode 'Test/More.pbc'
24 .local pmc exports, curr_namespace, test_namespace
25 curr_namespace = get_namespace
26 test_namespace = get_namespace [ 'Test'; 'More' ]
27 exports = split ' ', 'plan diag ok nok is is_deeply like isa_ok skip isnt todo'
29 test_namespace.'export_to'(curr_namespace, exports)
33 load_bytecode 'TclLibrary.pbc' # TBD pbc
34 'ok'(1, 'loaded TclLibrary')
36 goto skip_all # this is TEMPORARY untill the case of missing libtcl is fixed
39 tcl = new 'TclLibrary'
40 'ok'(1, 'created instance')
44 res = tcl.'eval'("return {3+3}")
45 'is'(res, '3+3', 'return of a string')
46 # TODO res = tcl.'eval'("return [list a b foo bar]")
47 ires = tcl.'eval'("expr {3+3}")
48 'is'(ires, 6, 'return of an integer')
49 res = tcl.'eval'("return [expr 1.0]")
50 'is'(res, '1.0', 'return of double')
59 # vim: expandtab shiftwidth=4 ft=pir: