no-mistakes-postgres-engine 0.109.130

PostgreSQL embedded SQL extraction, schema catalog, and replay-safety analysis for no-mistakes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[test]
fn quoted_identifier_fixtures_preserve_case_and_component_boundaries() {
    let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
        .join("../../fixtures/postgres/catalog/identifier-names.json");
    let cases: Vec<serde_json::Value> =
        serde_json::from_str(&std::fs::read_to_string(path).unwrap()).unwrap();
    for case in cases {
        let input = case["input"].as_str().unwrap();
        assert_eq!(
            super::super::names::normalize_table_name(input),
            case["table"].as_str().unwrap()
        );
        assert_eq!(
            super::super::names::normalize_identifier(input),
            case["identifier"].as_str().unwrap()
        );
    }
}