mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
unit test for correct answer escaping
This commit is contained in:
parent
55e6ddfed8
commit
c74a59f451
1 changed files with 9 additions and 0 deletions
|
|
@ -391,6 +391,15 @@ mod test {
|
|||
assert_eq!(ctx, "<code id=typeans>123</code>");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_input_is_escaped() {
|
||||
let ctx = Diff::new("source <dir>/bin/activate", "source <dir>/bin/activate");
|
||||
assert_eq!(
|
||||
ctx.to_html(),
|
||||
"<code id=typeans><span class=typeGood>source <dir>/bin/activate</span></code>"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_input_is_collapsed() {
|
||||
let ctx = Diff::new("123", "123");
|
||||
|
|
|
|||
Loading…
Reference in a new issue