From 8921614656fcad6ebb3cb1f88a2ff5b042702f41 Mon Sep 17 00:00:00 2001 From: Dialga Date: Sun, 7 Jan 2024 22:57:10 +1300 Subject: [PATCH] Update test --- actix-files/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs index 8ceb59bef..570f76300 100644 --- a/actix-files/src/lib.rs +++ b/actix-files/src/lib.rs @@ -573,14 +573,14 @@ mod tests { // Create the file we want to test against ad-hoc. We can't check it in as otherwise // Windows can't even checkout this repository. let temp_dir = tempfile::tempdir().unwrap(); - let file_with_newlines = temp_dir.path().join("test\nnewline.text"); + let file_with_newlines = temp_dir.path().join("test\n\x0B\x0C\rnewline.text"); fs::write(&file_with_newlines, "Look at my newlines").unwrap(); let srv = test::init_service( App::new().service(Files::new("/", temp_dir.path()).index_file("Cargo.toml")), ) .await; - let request = TestRequest::get().uri("/test%0Anewline.text").to_request(); + let request = TestRequest::get().uri("/test%0A%0B%0C%0Dnewline.text").to_request(); let response = test::call_service(&srv, request).await; assert_eq!(response.status(), StatusCode::OK);