MCPcopy Create free account
hub / github.com/archlinux/alpm / test_data

Function test_data

alpm-compress/src/tarball/reader.rs:320–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318 /// Returns the file and its content for verification.
319 #[fixture]
320 fn test_data() -> TestResult<(NamedTempFile, [u8; 9])> {
321 const TEST_CONTENT: &[u8; 9] = b"alpm4ever";
322 let file = NamedTempFile::new()?;
323 {
324 let mut f = file.reopen()?;
325 f.write_all(TEST_CONTENT)?;
326 f.flush()?;
327 }
328 Ok((file, *TEST_CONTENT))
329 }
330
331 #[rstest]
332 #[case::bzip2(".tar.bz2", CompressionSettings::Bzip2 {

Callers

nothing calls this directly

Calls 2

write_allMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected