From c74a59f451bc3c07631809c65c869bea0934434a Mon Sep 17 00:00:00 2001 From: Eltaurus Date: Sat, 25 Oct 2025 10:00:54 +0600 Subject: [PATCH] unit test for correct answer escaping --- rslib/src/typeanswer.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rslib/src/typeanswer.rs b/rslib/src/typeanswer.rs index 479d10a36..c3b25071b 100644 --- a/rslib/src/typeanswer.rs +++ b/rslib/src/typeanswer.rs @@ -391,6 +391,15 @@ mod test { assert_eq!(ctx, "123"); } + #[test] + fn correct_input_is_escaped() { + let ctx = Diff::new("source /bin/activate", "source /bin/activate"); + assert_eq!( + ctx.to_html(), + "source <dir>/bin/activate" + ); + } + #[test] fn correct_input_is_collapsed() { let ctx = Diff::new("123", "123");