()
| 1794 | |
| 1795 | #[test] |
| 1796 | fn test_indexed_map_access() { |
| 1797 | let mut context = Context::default(); |
| 1798 | let mut headers = HashMap::new(); |
| 1799 | headers.insert("Content-Type", "application/json".to_string()); |
| 1800 | context.add_variable_from_value("headers", headers); |
| 1801 | |
| 1802 | let program = Program::compile("headers[\"Content-Type\"]").unwrap(); |
| 1803 | let value = program.execute(&context).unwrap(); |
| 1804 | assert_eq!(value, "application/json".into()); |
| 1805 | } |
| 1806 | |
| 1807 | #[test] |
| 1808 | fn test_numeric_map_access() { |
nothing calls this directly
no test coverage detected