()
| 2909 | |
| 2910 | #[test] |
| 2911 | fn test_pgadmin4_full_query_preprocessing() { |
| 2912 | let query = "SELECT set_config('bytea_output','hex',false) FROM pg_show_all_settings() WHERE name = 'bytea_output'"; |
| 2913 | |
| 2914 | let rewritten = preprocess_query(query); |
| 2915 | assert_eq!( |
| 2916 | rewritten, |
| 2917 | "SELECT set_config('bytea_output','hex',false) FROM pg_settings WHERE name = 'bytea_output'" |
| 2918 | ); |
| 2919 | |
| 2920 | let caps = SET_CONFIG_PATTERN.captures(&rewritten).unwrap(); |
| 2921 | assert_eq!(&caps[1], "bytea_output"); |
| 2922 | assert_eq!(&caps[2], "hex"); |
| 2923 | assert_eq!(&caps[3], "false"); |
| 2924 | } |
| 2925 | } |
nothing calls this directly
no test coverage detected