Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
toeb committed Jul 7, 2017
1 parent aa1194f commit b96fd05
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions tests/obj/ref_nav_test.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,59 @@
function(test)


function(refset values expressions force value)
list_pop_front(expressions)
ans(current_expression)

set(result)

print_vars(expression indices expressions force value refs )

if("${current_expression}" MATCHES "^[<>].*[<>]$")
message("range")
else()
foreach(ref ${refs})
is_address("${ref}")
ans(is_address)
if(is_address)
list(APPEND result "${ref}")
else()
if(force)
map_new()
ans_apend(result)
endif()
endif()
endforeach()


foreach(ref ${result})
#refset("${")
map_set("${ref}" "${property}" "${value}")
endforeach()


endif()


return()
endfunction()


data("[{a:1},{a:2}]")
ans(dat)

navigation_expression_parse("a")
ans(expression)

refset("${dat}" "" "" "${expression}" false "myval")
ans(res)



json_print(${res})






Expand Down

0 comments on commit b96fd05

Please sign in to comment.