Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Feel-ix-343 committed Apr 3, 2024
1 parent e1788e4 commit 8fe026f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/vault/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,40 @@ fj aklfjd
assert_eq!(parsed, expected)

}

#[test]
fn test_short_code_block_parsing_multiple() {


let test = r" fjdlf jdlk `test code block` jfkl `dlk` j";

let parsed = MDCodeBlock::new(test).collect_vec();

let expected = vec![MDCodeBlock{
range: Range {
start: Position {
line: 0,
character: 13
},
end: Position {
line: 0,
character: 30
}
}.into()
}, MDCodeBlock{
range: Range {
start: Position {
line: 0,
character: 36
},
end: Position {
line: 0,
character: 41
}
}.into()
}];

assert_eq!(parsed, expected)

}
}

0 comments on commit 8fe026f

Please sign in to comment.