Verifies: SYS-REQ-023 [boundary] Out-of-bounds array index returns not-found.
(t *testing.T)
| 1057 | // Verifies: SYS-REQ-023 [boundary] |
| 1058 | // Out-of-bounds array index returns not-found. |
| 1059 | func TestGetArrayIndexOutOfBounds(t *testing.T) { |
| 1060 | data := []byte(`{"arr":[1,2,3]}`) |
| 1061 | _, _, _, err := Get(data, "arr", "[5]") |
| 1062 | if !errors.Is(err, KeyPathNotFoundError) { |
| 1063 | t.Fatalf("Get OOB array index error = %v, want %v", err, KeyPathNotFoundError) |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | // Verifies: SYS-REQ-024 [boundary] |
| 1068 | // Escaped key in payload matches decoded path segment. |