()
| 1358 | |
| 1359 | #[test] |
| 1360 | fn test_fstring() { |
| 1361 | // F-strings |
| 1362 | snapshot_test_lexer( |
| 1363 | "f-string-literals", |
| 1364 | &[ |
| 1365 | "f\"hello\"", |
| 1366 | "f'hello_{var}'", |
| 1367 | "f\"world\"", |
| 1368 | "f\"\"", |
| 1369 | "a = f\"hello\"", |
| 1370 | "f\"\"\"hello\"\"\"", |
| 1371 | "f'''hello'''", |
| 1372 | "f\"{{hey}}\"", |
| 1373 | "f\"oh_{{hey}}\"", |
| 1374 | "f'a' 'c'", |
| 1375 | "f'hello_{f'''{a}'''}'", |
| 1376 | ], |
| 1377 | ) |
| 1378 | .unwrap(); |
| 1379 | |
| 1380 | // Raw F-strings |
| 1381 | snapshot_test_lexer( |
| 1382 | "raw-f-string-literals", |
| 1383 | &[ |
| 1384 | "rf\"hello\"", |
| 1385 | "rf\"world\"", |
| 1386 | "rf\"\"", |
| 1387 | "a = rf\"hello\"", |
| 1388 | "rf'hello_{var}'", |
| 1389 | "rf\"\"\"hello\"\"\"", |
| 1390 | "rf'''hello'''", |
| 1391 | ], |
| 1392 | ) |
| 1393 | .unwrap(); |
| 1394 | } |
| 1395 | |
| 1396 | #[test] |
| 1397 | fn test_ellipsis() { |
nothing calls this directly
no test coverage detected