add unstable support for outputting file checksums for use in cargo
This commit is contained in:
parent
bfe5e8cef6
commit
bb5a8276be
16 changed files with 321 additions and 28 deletions
|
@ -3,9 +3,13 @@ use super::*;
|
|||
#[test]
|
||||
fn test_lookup_line() {
|
||||
let source = "abcdefghijklm\nabcdefghij\n...".to_owned();
|
||||
let mut sf =
|
||||
SourceFile::new(FileName::Anon(Hash64::ZERO), source, SourceFileHashAlgorithm::Sha256)
|
||||
.unwrap();
|
||||
let mut sf = SourceFile::new(
|
||||
FileName::Anon(Hash64::ZERO),
|
||||
source,
|
||||
SourceFileHashAlgorithm::Sha256,
|
||||
Some(SourceFileHashAlgorithm::Sha256),
|
||||
)
|
||||
.unwrap();
|
||||
sf.start_pos = BytePos(3);
|
||||
assert_eq!(sf.lines(), &[RelativeBytePos(0), RelativeBytePos(14), RelativeBytePos(25)]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue