()
| 345 | |
| 346 | #[test] |
| 347 | fn csv_by_extension() { |
| 348 | let stmt = ok("COPY users FROM '/tmp/users.csv'"); |
| 349 | match stmt { |
| 350 | NodedbStatement::Misc(MiscStmt::CopyFromFile { format, .. }) => { |
| 351 | assert_eq!(format, Some(CopyFormat::Csv)); |
| 352 | } |
| 353 | other => panic!("unexpected: {other:?}"), |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | #[test] |
| 358 | fn explicit_format_overrides_extension() { |