File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -64,24 +64,25 @@ bash_object.traverse-get() {
64
64
# TODO: test these internal invalid errors
65
65
# Do nothing (assuming the type is correct), we have already set 'current_object'
66
66
# for the next iteration
67
- case " $vmd_dtype " in
68
- object)
69
- if [ " $is_index_of_array " = yes ]; then
70
- bash_object.util.traverse_fail ' ERROR_INTERNAL_INVALID_VOBJ' " Expected object, but reference to array was found"
71
- return
72
- fi
73
- ;;
74
- array)
75
- if [ " $is_index_of_array " = no ]; then
76
- bash_object.util.traverse_fail ' ERROR_INTERNAL_INVALID_VOBJ' " Expected array, but reference to object was found"
77
- return
78
- fi
79
- ;;
80
- * )
81
- bash_object.util.traverse_fail ' ERROR_INTERNAL_INVALID_VOBJ' " vmd_dtype: $vmd_dtype "
82
- return
83
- ;;
84
- esac
67
+ :
68
+ # case "$vmd_dtype" in
69
+ # object)
70
+ # if [ "$is_index_of_array" = yes ]; then
71
+ # bash_object.util.traverse_fail 'ERROR_INTERNAL_INVALID_VOBJ' "Expected object, but reference to array was found"
72
+ # return
73
+ # fi
74
+ # ;;
75
+ # array)
76
+ # if [ "$is_index_of_array" = no ]; then
77
+ # bash_object.util.traverse_fail 'ERROR_INTERNAL_INVALID_VOBJ' "Expected array, but reference to object was found"
78
+ # return
79
+ # fi
80
+ # ;;
81
+ # *)
82
+ # bash_object.util.traverse_fail 'ERROR_INTERNAL_INVALID_VOBJ' "vmd_dtype: $vmd_dtype"
83
+ # return
84
+ # ;;
85
+ # esac
85
86
elif (( i+ 1 == ${# REPLIES[@]} )) ; then
86
87
# We are last element of query, return the object
87
88
if [ " $final_value_type " = object ]; then
Original file line number Diff line number Diff line change @@ -82,4 +82,9 @@ load './util/init.sh'
82
82
assert [ " ${REPLY[0]} " = omicron ]
83
83
assert [ " ${REPLY[1]} " = pi ]
84
84
assert [ " ${REPLY[2]} " = rho ]
85
+
86
+
87
+ bash_object.traverse-get array OBJECT ' .["my_key"].[2].[0]'
88
+
89
+ assert [ " $REPLY " = omicron ]
85
90
}
You can’t perform that action at this time.
0 commit comments