Creates a file with `contents` and tries to extract its propline.
(contents: &str)
| 106 | |
| 107 | /// Creates a file with `contents` and tries to extract its propline. |
| 108 | fn do_extract(contents: &str) -> io::Result<PropLine> { |
| 109 | let dir = tempfile::tempdir().unwrap(); |
| 110 | let path = dir.path().join("script.bas"); |
| 111 | fs::write(&path, contents).unwrap(); |
| 112 | extract_propline(path) |
| 113 | } |
| 114 | |
| 115 | #[test] |
| 116 | fn test_extract_propline_no_shebang() { |