mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
to_code now adds quotes around strings.
to_code for map now includes keys. This maans that the basic script-functions test passes.
This commit is contained in:
@@ -93,6 +93,7 @@ assert( length([]) == 0)
|
||||
assert( length([1]) == 1)
|
||||
assert( length([1,2]) == 2)
|
||||
assert( length([a:1,b:2]) == 2)
|
||||
assert( length([1,2,3] + [4,5]) == 5)
|
||||
assert( length("") == 0)
|
||||
assert( length("1") == 1)
|
||||
assert( length("12") == 2)
|
||||
@@ -183,7 +184,7 @@ assert(to_code("abc") == "\"abc\"")
|
||||
assert(to_code("\\\<\n\r\t") == "\"\\\\\\<\\n\\r\\t\"")
|
||||
assert(to_code(1) == "1")
|
||||
assert(to_code([1,2,3]) == "[1,2,3]")
|
||||
assert(to_code([x:"y"]) == "[x:\"y\"]")
|
||||
assert(to_code([x:"y"]) == "[\"x\":\"y\"]")
|
||||
|
||||
# count_chosen
|
||||
assert( count_chosen("") == 0 )
|
||||
|
||||
Reference in New Issue
Block a user