-
Notifications
You must be signed in to change notification settings - Fork 12
/
object.test
27 lines (21 loc) · 660 Bytes
/
object.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if {"::tcltest" ni [namespace children]} {
package require tcltest
namespace import ::tcltest::*
}
package require rl_json
source [file join [file dirname [info script]] helpers.tcl]
test object-1.1 {Create an object - args} -body { #<<<
json object a {number 1} c {num 2} e {num 3} g {num 4}
} -result {{"a":1,"c":2,"e":3,"g":4}}
#>>>
test object-1.2 {Create an object - single arg} -body { #<<<
json object {a {number 1} c {num 2} e {num 3} g {num 4}}
} -result {{"a":1,"c":2,"e":3,"g":4}}
#>>>
::tcltest::cleanupTests
return
# Local Variables:
# mode: tcl
# tab-width: 4
# End:
# vim: ft=tcl foldmethod=marker foldmarker=<<<,>>> ts=4 shiftwidth=4