MCPcopy Create free account
hub / github.com/endbasic/endbasic / do_extract

Function do_extract

cli/src/propline.rs:108–113  ·  view source on GitHub ↗

Creates a file with `contents` and tries to extract its propline.

(contents: &str)

Source from the content-addressed store, hash-verified

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() {

Calls 1

extract_proplineFunction · 0.85