()
| 135 | |
| 136 | #[tokio::test] |
| 137 | async fn copy_csv_semicolon_delimiter() { |
| 138 | let srv = TestServer::start().await; |
| 139 | |
| 140 | srv.exec("CREATE COLLECTION copy_semi_test (id INT, name TEXT, val FLOAT)") |
| 141 | .await |
| 142 | .expect("CREATE COLLECTION"); |
| 143 | |
| 144 | let csv = "id;name;val\n1;alice;1.1\n2;bob;2.2\n3;carol;3.3\n"; |
| 145 | // Write with an arbitrary suffix — format will be given explicitly. |
| 146 | let f = write_temp(csv, ".txt"); |
| 147 | let path = f.path().to_string_lossy().to_string(); |
| 148 | |
| 149 | srv.exec(&format!( |
| 150 | "COPY copy_semi_test FROM '{path}' WITH (FORMAT csv, DELIMITER ';')" |
| 151 | )) |
| 152 | .await |
| 153 | .expect("COPY CSV DELIMITER ;"); |
| 154 | |
| 155 | assert_eq!(count_rows(&srv, "copy_semi_test").await, 3); |
| 156 | } |
| 157 | |
| 158 | // ── test 6: HEADER false (positional columns) ──────────────────────────────── |
| 159 |
nothing calls this directly
no test coverage detected