Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim committed Oct 4, 2023
1 parent 5714290 commit 319a2aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions symbolic-debuginfo/src/sourcebundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,22 @@ mod tests {
Ok(())
}

#[test]
fn test_non_utf8() -> Result<(), SourceBundleError> {
let writer = Cursor::new(Vec::new());
let mut bundle = SourceBundleWriter::start(writer)?;

assert!(bundle
.add_file(
"bar.txt",
&[0, 159, 146, 150][..],
SourceFileInfo::default()
)
.is_err());

Ok(())
}

#[test]
fn test_duplicate_files() -> Result<(), SourceBundleError> {
let writer = Cursor::new(Vec::new());
Expand Down

0 comments on commit 319a2aa

Please sign in to comment.